Saving lives on the railways