Section 48. The commissioner shall make such orders as he may deem just as to the payment by the owner to the commonwealth or other party of the costs and expenses incurred by them under the preceding 4 sections, with interest, from the time they were paid by the commonwealth. Notice shall be given to the state treasurer and the owner or other party for the amount due to the commonwealth. Any action taken by the commissioner pursuant to section 47 shall create a lien upon the lot of land on which the dam is situated and upon the buildings and structures on said lot to secure payment for all costs incurred by the commissioner in correcting the unsafe condition, plus interest. The attorney general, upon notice by the commissioner, shall institute an action to enforce such lien.