cleaned up output file worker