When any railroad is crossed by a highway at the same level, the company operating such railroad shall, at its own expense, so guard its rails by plank or otherwise as to secure a safe and easy passage across its road. If the selectmen of any town, the mayor of any city or the warden of any borough represents in writing to the Commissioner of Transportation that a company has failed to comply with the requirements of this section in regard to any highway within such town, city or borough, said commissioner shall examine such crossing and make such order as he deems necessary to carry out the provisions of this section.