appending to end of file instead of keeping in memory