print error when the file format is wrong