fix which output files get deleted