Car almost hit by train