 
     @maxBufferSize = maxBufferSize # TODO
 
-    @waitForPartAattempts = waitForPartAattempts or 5
+    @waitTime            = waitTime or 2000
+    @waitForPartAttempts = waitForPartAttempts or 5
 
     if not @objectParams.Bucket then throw new Error "Bucket must be given"
 

            Key:      @objectParams.Key

          ,(err, data) =>
            parts = []
            for part in data?['Parts'] or []
              parts.push part.ETag

            #shouldn't happens
            if not parts.length
              if not callbackCalled
                callbackCalled = true
                return cb()

            hasAllParts = true

            for partNumber, etag of @uploadedParts
              if not (etag in parts)
                hasAllParts = false
                break

            if hasAllParts
              if not callbackCalled
                callbackCalled = true
                return cb()

            if checkPartsCounterInt > @waitForPartAattempts
              if not callbackCalled
                callbackCalled = true
                return cb new Error 'No all parts uploaded'

        ), 2000
      ], (err) =>

        clearInterval checkPartsInterval

        if err
          #is it necessary to have both - err and failed ? (imho error should imply fail)
          @emit 'error', err
          return @emit 'failed', err

        @emit 'finishing'

        @getNewClient().completeMultipartUpload
          UploadId: @uploadId


class Uploader extends EventEmitter
  #FIXME: 0 records?
  constructor: ({accessKey, secretKey, region, stream, objectName, objectParams, bucket, partSize, maxBufferSize, waitForPartAttempts, waitTime}, @cb) ->
    super()
    aws.config.update
      accessKeyId:     accessKey
