to write binary file you must use out.write() method