Rename the output file to the original file after we are done.