additionally, if we prune before we write, we know we won't accidentally prune the file we just wrote