In case the said property shall remain unclaimed for sixty days after the said publication, it shall be the duty of the person or company having possession thereof, to apply to a magistrate of the town or city in which said property is retained, in whose presence and under whose direction said property shall be opened and examined, and an inventory thereof taken by said magistrate; and if the name and residence of the owner is ascertained by such examination, it shall be the duty of the magistrate forthwith to direct a notice thereof to such owner, by mail; and if said property shall remain unclaimed for three months after such examination, it shall be the further duty of the person or company having possession thereof to apply to a magistrate as aforesaid; and if said magistrate shall deem such property of sufficient value, he shall cause the same to be sold at public auction, giving six days’ previous notice of the time and place of such sale; and from the proceeds of such sale he shall pay the charges and expenses legally incurred in respect to said property, or a ratable proportion thereof to each claimant, if insufficient for the payment of the whole amount; and the balance of the proceeds of such sale, if any, the said magistrate shall immediately pay to the public welfare officials of said town or city, for the use of the poor thereof; and the said public welfare officials shall make an entry of such amount, and the time of receiving the same, upon their official records, and it shall be subject, at any time within seven years thereafter, to be reclaimed by, and refunded to, the owner of such property, his heirs or assigns, on satisfactory proof of such ownership.