Such lien shall terminate unless an action is brought to enforce the same within three months after the date of filing such notice, as provided in article nine for the enforcement of a lien upon a chattel. If the labor upon such sandstone, cement stone, granite, bluestone, limestone or marble is performed for a contractor under a contract with the owner of such quarry, mine, yard or dock, the owner shall not be liable to pay by reason of all the liens filed against such quarry, mine, yard or dock, a greater sum than the amount unpaid upon such contract at the time of filing such notices, or in case there is no contract, than the aggregate amount unpaid of the value of labor and services performed, pursuant to the preceding section. The lien created by this article shall not attach to any material which shall have become a part of any building or structure, or ceased to be the property of the person for whom such labor was performed.
N.Y. Lien Law § 141