fix binary file check bug