clean up after ingestions
unexpected errors need to be recorded as errors in teh log name
temp files to outdir, logfiles to log dir, both cwd by default, and cleanup afterwards