[bug[ Check for already existing files and folder before rename.

Fixes #2560 

I think we should move all error messages as message constants. We may want a smarter way to allow dynamic arguments in constant messages.