Change open mode to binary in readFile