When we close a file, flush out ALL pending buffers