Diagnosing or detecting failure of vehicles