Section 107. Every railroad corporation shall, except as provided in sections sixty-five to eighty-two, inclusive, of chapter one hundred and fifty-nine, at its own expense, construct, maintain and keep in repair all bridges, with their approaches and abutments, which it is authorized or required to construct over or under a canal or public way; and a city or town may recover of the railroad corporation whose railroad crosses a public way therein all damages, charges and expenses incurred by such city or town by reason of the neglect or refusal of the corporation to erect or keep in repair all structures required or necessary at such crossing; but if, after the laying out and building of a railroad, the county commissioners authorize a public way to be laid out across the railroad, all expenses of and incident to constructing and maintaining the way at such crossing shall be borne by the county, city, town or other owner of the same, unless otherwise determined by an award of a commission, under proceedings in accordance with sections fifty-nine to sixty-four, inclusive, of chapter one hundred and fifty-nine.