Man almost falls under train