Making sure files are removed before copying