Every person or corporation operating a railroad must put cattle guards and crossings for plantation roads upon such railroad, and keep the same in good repair, whenever the owner or person in possession of the land through which the road passes shall make demand upon them or their agents, and show that such guards are necessary to prevent the depredation of stock upon his land, and the crossings are necessary for the proper use of the land. The owner or person in possession of the land through which the railroad passes may recover, of the person or corporation operating the railroad, the sum of $25.00 for every 30 days of default on the part of the person or corporation operating the railroad after written demand, served on an officer, road master or section foreman, designating the place for the erection of the cattle guard or road crossing, and a like penalty for failing to keep the cattle guard or road crossing in good repair after written demand.