Delete file and rename one