Increasing safety in automated freight rail