Finished replacing fprintf in binary output with putc