remove local files before replacing them