Any person who wilfully impairs, injures, destroys or obstructs the use of any railroad enjoyed under this title or any of its necessary works, wharves, bridges, carriages, engines, cars, machines or other property shall forfeit and pay to the corporation the sum of $50, to be by it recovered in any court having competent jurisdiction in any civil action and shall be liable for all damages sustained.