         return
 
       @_createStream = (_id, path, opts) ->
-        return self._currentUploads[_id] = new writeStream path, opts.fileLength, opts
+        return self._currentUploads[_id] = new writeStream path, opts.fileLength, opts, self.permissions
 
       # This little function allows to continue upload
       # even after server is restarted (*not on dev-stage*)
       @_continueUpload = (_id) ->
         if self._currentUploads?[_id]?.file
-          unless self._currentUploads[_id].stream._writableState.ended
+          if not self._currentUploads[_id].aborted and not self._currentUploads[_id].ended
             return self._currentUploads[_id].file
           else
             self._createStream _id, self._currentUploads[_id].file.file.path, self._currentUploads[_id].file

    @returns {Boolean} - True if stream is fulfilled, false if queue is in progress
    ###
    end: (callback) ->
      if not @aborted and not @stream._writableState.ended
        if @writtenChunks is @maxLength
          @stream.end callback
          return true
        else
          self = @

                  {result, opts}  = self._prepareUpload _.extend(opts, _continueUpload), user.userId, 'HTTP'

                  if opts.eof
                    self._handleUpload result, opts, ->
                      response.writeHead 200
                      result.file.meta = fixJSONStringify result.file.meta if result?.file?.meta
                      response.end JSON.stringify result
                      return
                    return
                  else
                    self.emit '_handleUpload', result, opts, NOOP

