studying how to check whether a file is binary or not