rem: if (remove_files) delete_all_files ();
add: close_output_file ();  sigprocmask (SIG_BLOCK, &caught_signals, &oldset); delete_all_files (); sigprocmask (SIG_SETMASK, &oldset, NULL);
context: cleanup (void){  if (output_stream)    close_output_file ();  if (remove_files)    delete_all_files ();}