correct bugs in file format check