flush last chunk at end of file