Call flush_write_file() in _exit_cleanup() if we are keeping a