Write data out to file as soon as possible.

Building up a ton of buffers just wastes a bunch of memories.