Change write mode in file to binary