Buffering writes during an export to file