Guy almost hit by train