Section 44A. If real estate taken in whole or in part by eminent domain was at the time of said taking subject to any lien for taxes, assessments or other charges, which is extinguished by such taking, and if the collector of taxes of the town in which such real estate is located gives written notice of a claim of the amount covered by such lien to the body politic or corporate, on behalf of which such taking was made, prior to the payment of any award of damages for such taking or to the entry of judgment therefor, said collector shall be entitled to be paid such amount before any payment of damages for such taking is made to any other party; and any amount so payable on account of such taxes, assessments or other charges shall be deducted from the amount of such damages otherwise payable.