clean up output file