Fix a bug with an invalid format file