binary file detection fixed