Railway accident prevention measures