 
   @spec do_build_stage1(String.t, String.t, build_mode)
     :: Error.result(String.t)
+
   defp do_build_stage1(src, dest, mode) do
     IO.puts "Rebuilding Website..."
     BuildDataStorage.init self()

    end
  end

  @spec clean_dest(String.t) :: :ok
  defp clean_dest(dest) do
    File.mkdir_p! "#{dest}"
    IO.puts "Created directory `#{dest}`."

    # exclude dotfiles so that git repository is not blown away
    dest |> File.ls!
         |> Enum.filter(&(not String.starts_with?(&1, ".")))
         |> Enum.map(&("#{dest}#{&1}"))
         |> Enum.each(&File.rm_rf!(&1))
  end

  @spec launch_tasks(build_mode, String.t, String.t) :: Error.result
  defp launch_tasks(:parallel, src, dest) do
    IO.puts "⚡️  \x1b[1mStarting parallel build...\x1b[0m"
    t1 = Task.async fn -> PageBuilder.run src, dest, :parallel end

  end

  @spec try_copy(String.t, String.t) :: :ok

  defp try_copy(src, dest) do
    case File.cp_r src, dest do
      {:error, reason, _} ->
