what safety measures are provided on a railroad crossing to prevent accidents