When the owner or his agent is notified as provided in this Act, he shall retain from any money due or to become due the contractor, an amount sufficient to pay all demands that are or will become due such sub-contractor, tradesman, materialman, mechanic, or worker of whose claim he is notified, and shall pay over the same to the parties entitled thereto.
Such payment shall be as follows:
First - All claims for wages shall be paid in full.
Second - The claims of tradesmen, materialmen and sub-contractors, who are entitled to liens pro rata, in proportion to the amount due them respectively. All payments made as directed shall, as between such owner and contractor, be considered the same as if paid to such contractor. Any payment made by the owner to the contractor after such notice, without retaining sufficient money to pay such claims, shall be considered illegal and made in violation of the rights of the laborers and sub-contractors and the rights of such laborers and sub-contractors to a lien shall not be affected thereby, but the owner shall not be held liable to any laborer and sub-contractor or other person whose name is omitted from the statement provided for in Sections 5 and 22 of this Act, nor for any larger amount than the sum therein named as due such person (provided such omission is not made with the knowledge or collusion of the owner), unless previous thereto or to his payment to his contractor, he shall be notified, as herein provided, by such person of their claim and the true amount thereof.
Third - The balance, if any, to the contractor.
770 ILCS 60/27