   ###
   @summary Require NPM packages
   ###
-  fs       = require 'fs-extra'
-  events   = require 'events'
-  request  = require 'request'
-  Throttle = require 'throttle'
-  fileType = require 'file-type'
-  nodePath = require 'path'
+  fs       = Npm.require 'fs-extra'
+  events   = Npm.require 'events'
+  request  = Npm.require 'request'
+  Throttle = Npm.require 'throttle'
+  fileType = Npm.require 'file-type'
+  nodePath = Npm.require 'path'
 
   ###
   @var {Object} bound - Meteor.bindEnvironment (Fiber wrapper)


                  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

                  response.writeHead 204
                  response.end()

                else
                  opts           = JSON.parse body
                  opts.___s      = true
                  console.info "[FilesCollection] [File Start HTTP] #{opts.file.name} - #{opts.fileId}" if self.debug
                  opts.file.meta = fixJSONParse opts.file.meta if opts?.file?.meta

  _404: if Meteor.isServer then (http) ->
    console.warn "[FilesCollection] [download(#{http.request.originalUrl})] [_404] File not found" if @debug
    text = 'File Not Found :('

    if !http.response.headersSent
      http.response.writeHead 404,
        'Content-Length': text.length
        'Content-Type':   'text/plain'
    if !http.response.finished
      http.response.end text
    return
  else undefined

