one stream per file to fix write after end bug