always try to remove the new file before restoring the old one (#1963)