clean up the output file