Replace file write

Previous commit still used incorrect file write w/ buffers.