opening output stream in binary mode; still have to make sure that data is written in big Endian format