   @moduledoc """
   This module is responsible for packaging a release into a tarball.
   """
-  alias Mix.Releases.{Release, Overlays, Utils}
+  alias Mix.Releases.{Release, Overlays, Utils, Logger}
 
   def archive(%Release{} = release) do
     name = "#{release.name}"
     output_dir = Path.relative_to_cwd(Path.join("rel", "#{release.name}"))
 
+    Logger.debug "Archiving #{release.name}-#{release.version}"
     case make_tar(release, name, output_dir) do
       {:error, _} = err ->
         err

               {'erts-#{erts_vsn}', '#{Path.join(output_dir, "erts-" <> erts_vsn)}'}]
          end
        ] ++ overlays, [:dereference, :compressed])
    File.rm_rf!(tmpdir)
    :ok
  end

  defp apply_overlays(release, _name, output_dir) do
    overlay_vars = release.profile.overlay_vars ++ generate_overlay_vars(release)
    hook_overlays = [
      {:mkdir, "releases/<%= release_version %>/hooks"},

      end
    ]
    rel_path = '#{Path.join([output_dir, "releases", release.version, name])}'
    Logger.debug "Writing tarball to #{rel_path}.tar.gz"
    case :systools.make_tar(rel_path, opts) do
      :ok ->
        :ok
