Fix test when the output file exists.