Section 39. When the commonwealth holds any bond, note or certificate of indebtedness payable to bearer and issued by a county, city, town or district or any domestic corporation, such county, city, town, district or corporation shall, at the request of the state treasurer, issue in exchange therefor a bond, note or certificate of the same effect, payable to the commonwealth by name. The commonwealth shall pay the expense involved in making such exchange. Any county, city, town, district or corporation neglecting or refusing to comply with this section shall be punished by a fine of not more than $50.