 
       fileReader.onload = (chunk) ->
         ++totalSentChunks
-        # console.log "currentChunk", currentChunk
         onProgress and onProgress((uploaded / file.size) * 100)
-        # console.log "PROGRESS: ", (uploaded / file.size) * 100
 
         uploaded   += self.chunkSize
         binary      = chunk.srcElement or chunk.target
         arrayBuffer = new Uint8Array binary.result
         last        = (part is streams and currentChunk >= chunksQtyInPart)
 
-        # console.log "isLastPart?", last, "#{currentChunk} >= #{chunksQtyInPart}"
 
         if chunksQtyInPart is 1
           Meteor.call self.methodNames.MeteorFileWrite, arrayBuffer, fileData, meta, first, chunksQtyInPart, currentChunk, totalSentChunks, randFileName, part, streams, file.size, (error, data) ->

      Meteor.setTimeout ((parts, i) ->
        return () ->
          part = parts[i]
          # console.log "Upload part#", part
          fileReader = new FileReader
          # console.log "Slice file to parts: #{index}"
          upload(file.slice(part.from, part.to), i + 1, part.chunksQty, fileReader)
      )(parts, i)
      ,

              end error, data
        else
          Meteor.call self.methodNames.MeteorFileWrite, arrayBuffer, fileData, meta, first, chunksQtyInPart, currentChunk, totalSentChunks, randFileName, part, streams, file.size, (error, data)->
            if data.chunk + 1 <= chunksQtyInPart
              from         = currentChunk * self.chunkSize
              to           = from + self.chunkSize

              fileReader.readAsArrayBuffer filePart.slice from, to
              currentChunk = ++data.chunk
            else if data.last
              end error, data
        first = false

      fileReader.readAsArrayBuffer filePart.slice 0, self.chunkSize

    # for part, index in parts
