Changes rename task to check for file first before trying to rename.