         headers = {}
         data = JSON.stringify(docData.snapshot)
 
-    (error, result) ->
         s3.put(path, headers, data, cb)
+    (error, results) ->
       if error? and error.message.match 'The conditional request failed'
         callback?('Document already exists')
       else if error?


        db.putItem(request, cb)

    (error, result) ->
      if error?
        console.log('Failed to save Operation('+docName+'-'+opData.v+'): '+util.inspect(error))
        callback?('Failure')

        # handle getting more.
        db.query(request, cb)

    (error, results) ->
      if error?
        console.log('Failed to fetch Operations('+docName+'-'+start+'..'+end+'): '+util.inspect(error))
        callback?('Failure')
      else
        data = []
        for op in results.get_metadata.Items
          item = {
            op:   JSON.parse(op.op.S)
            meta: JSON.parse(op.meta.S)
