       else
         dataOp = 'onDeleteAll'
     else
+      console.log "Problem - no dataOp"
       return callback new Error "Cannot determine data operation"
 
+    console.log "Getting handler function"
     operationHandler = collectionToProcess.resolve dataOp
+    console.log "Handler is #{typeof operationHandler}"
 
     if operationHandler instanceof Error
       return callback(convertToError operationHandler)
 
     # TODO Need to handle runtime errors/unhandled exceptions - or do we?
+    console.log "Binding domain for error handling"
     taskDomain = domain.create()
 
     taskDomain.on 'error', (err) =>

    return completionHandler

  process = (task, modules, callback) ->
    unless task.collectionName?
      return callback new Error "CollectionName not found"

    collectionToProcess = collection task.collectionName
    dataOp = ''

    completionHandler = initCompletionHandler task

    if task.method is 'POST'
      dataOp = 'onInsert'
    else if task.method is 'PUT'
      dataOp = 'onUpdate'
    else if task.method is 'GET' and task.endpoint isnt '_count'
      if task.entityId?
        dataOp = 'onGetById'
      else if task.query?
        dataOp = 'onGetByQuery'
      else
        dataOp = 'onGetAll'
    else if task.method is 'GET' and task.endpoint is '_count'
      if task.query?

      else
        dataOp = 'onGetCount'
    else if task.method is 'DELETE'
      console.log "DataOp is Delete"
      if task.entityId?
        dataOp = 'onDeleteById'
      else if task.query?
