Section 93. Every railroad corporation shall erect and maintain suitable fences, with convenient bars, gates or openings therein, upon both sides of the entire length of its railroad, except at the crossings of a public way or in places where the convenient use of the railroad would be thereby obstructed, and except at places where, and so long as, it is specially exempted from so doing by the department. Such an exemption granted prior to August first, eighteen hundred and eighty-two shall not be revoked except upon new proceedings had under this section, notice of which shall be given to the corporation, and published once in each of three successive weeks in a newspaper published in each county where the land lies. The corporation shall also construct and maintain sufficient barriers, where necessary and practicable so to do, to prevent the entrance of cattle upon the railroad. A corporation which unreasonably neglects to comply with this and the following section shall, for every such neglect, forfeit not more than two hundred dollars for every month during which the neglect continues, and upon such neglect the supreme judicial court may restrain and prohibit it from crossing a public way, or from using any land until said sections are complied with.