He did so just seconds before the train ran quickly past him