Train almost hits cop car