the vehicle driver should have been cautious enough to see whether a train is approaching or not, simple wrong estimates of the speed of the train leads to many accidents which can be avoided by just being cautious.
i remember an ad which used to come before in tv - in unmanned level crossings, a driver stops the vehicle well before the tracks, gets down and checks both in both directions for train movement and once he feels it safe to cross, takes his vehicle across the track which is the right way. but nobody has the patience to do it. simply following the procedures will avoid many accidents.