Why are you using the binary file mode here?