Add support for writing binary files.