Train narrowly misses boy on bike