1st argument the binary output file name
added binary file write