correct the mode of binary file operations