added 'close OUTFILE;' in _save_local.