       when "add" then folder = "install"
       when "delete" then folder = "remove"
       else throw new Error("Unknown type")
-
-    log = (phase) ->
-      return callback(phase, type, mod)
 
     if mod.repo.type is "remote"
       stream = _getFromRemote(folder, mod, log)

              .generateNodeStream(streamFiles: true)
              .pipe(fs.createWriteStream(blitzPath))
              .on("finish", ->
                callback("zipcompressed", type, mod)
                resolve()
                return
              )

    switch type
      when "add" then config.add("appliedMods", {repo: mod.repo.name, name: mod.name})
      when "delete" then config.remove("appliedMods", {repo: mod.repo.name, name: mod.name})
    log("done")
  catch err
    progress("fail", type, mod, err)
  fs.remove(TEMP_FOLDER)
  return

###*
