 							return callback(err)
 						callback(err, {path:newPath}, project)
 
-	checkElementName: (folder, name, callback = (err) ->) ->
+	checkValidElementName: (folder, name, callback = (err) ->) ->
 		# check if the name is already taken by a doc, file or
 		# folder. If so, return an error "file already exists".
 		err = new Errors.InvalidNameError("file already exists")

			return callback(err) if err?
			# check if there is already a doc/file/folder with the same name
			# in the destination folder
			ProjectEntityHandler.checkElementName destEntity, entity.name, (err)->
				return callback(err) if err?
				if entityType.match(/folder/)
					logger.log destFolderPath: destFolderPath.fileSystem, folderPath: entityPath.fileSystem, "checking folder is not moving into child folder"

				newPath =
					fileSystem: "#{path.fileSystem}/#{element.name}"
					mongo: path.mongo
				ProjectEntityHandler.checkValidElementName folder, element.name, (err) =>
					return callback(err) if err?
					id = element._id+''
					element._id = require('mongoose').Types.ObjectId(id)
