Bufferize file writes