Woman almost hit by train