made flush an input argument so we don't kill filesystems unless we want to
a wrapper for nmode_f that writes to a tmpfile and moves it once the integration is done so that we don't destroy the nfs.