ReplaceLayer function will now try to hold on to the original files and replace them to the original location if anything goes wrong