 	mkdirpWithoutLock: (project_id, path, callback)->
 		logger.log project_id:project_id, path:path, "making directories if they don't exist"
 		ProjectEntityHandler.mkdirp project_id, path, (err, newFolders, lastFolder)=>
+			if err?
+				logger.err err:err, project_id:project_id, path:path, "error mkdirp without lock"
+				return callback(err)
 			self = @
 			jobs = _.map newFolders, (folder, index)->
 				return (cb)->

		newName = sanitize.escape(newName)
		Metrics.inc "editor.rename-entity"
		logger.log entity_id:entity_id, entity_id:entity_id, entity_id:entity_id, "reciving new name for entity for project"
		ProjectEntityHandler.renameEntity project_id, entity_id, entityType, newName, =>
			if newName.length > 0
				EditorRealTimeController.emitToRoom project_id, 'reciveEntityRename', entity_id, newName
				callback?()
#
	moveEntity: (project_id, entity_id, folder_id, entityType, callback)->
		Metrics.inc "editor.move-entity"
		ProjectEntityHandler.moveEntity project_id, entity_id, folder_id, entityType, =>
			EditorRealTimeController.emitToRoom project_id, 'reciveEntityMove', entity_id, folder_id
			callback?()

	renameProject: (project_id, newName, callback = (err) ->) ->
		ProjectDetailsHandler.renameProject project_id, newName, =>
			EditorRealTimeController.emitToRoom project_id, 'projectNameUpdated', newName
			callback()


			EditorController.addFileWithoutLock project_id, folder_id, fileName, path, source, (error, file)->
				LockManager.releaseLock project_id, ->
					callback(error, file)	

	addFileWithoutLock: (project_id, folder_id, fileName, path, source, callback = (error, file)->)->
		fileName = fileName.trim()
		logger.log {project_id, folder_id, fileName, path}, "sending new file to project"
		Metrics.inc "editor.add-file"
		ProjectEntityHandler.addFile project_id, folder_id, fileName, path, (err, fileRef, folder_id)=>
			if err?
				logger.err err:err, project_id:project_id, folder_id:folder_id, fileName:fileName, "error adding file without lock"
				return callback(err)
			EditorRealTimeController.emitToRoom(project_id, 'reciveNewFile', folder_id, fileRef, source)
			callback(err, fileRef)

	replaceFile: (project_id, file_id, fsPath, source, callback = (error) ->)->
		ProjectEntityHandler.replaceFile project_id, file_id, fsPath, callback

	addFolder : (project_id, folder_id, folderName, source, callback = (error, folder)->)->
		LockManager.getLock project_id, (err)->
