   catch e
     yield fs.copyAsync src, tgt
 
-add7z = async (archive, files, options) ->
+compress7zAsync = async (files, archive, options) ->
   try
     yield fs.removeAsync archive
   catch e

  log "Packaging app.asar."
  yield packageAsarAsync stage2_app, asar_path
  log "Compressing app.asar into #{release_path}"
  yield add7z release_path, asar_path
  log "Compression completed."
  asar_path


  d = new Date()
  str_date = "#{d.getUTCFullYear()}-#{d.getUTCMonth()+1}-#{d.getUTCDate()}"
  archive_path = path.join release_dir, "poiplugins_#{str_date}.7z"
  yield compress7zAsync gzip_root, archive_path

  log "Successfully built tarballs at #{archive_path}"

