   end
 
   @spec try_copy(String.t, String.t) :: :ok
+
   defp try_copy(src, dest) do
     case File.cp_r src, dest do
       {:error, reason, _} ->


    clean_dest dest
    prep_results =
      [check_tz: [],
       load_templates: [src],
       scan_pages: [src, dest]]
      |> Enum.map(fn {fun, args} ->
        apply Serum.BuildPrep, fun, args
      end)
      |> Error.filter_results(:build_preparation)
    case prep_results do
      :ok -> do_build_stage2 src, dest, mode

    end
  end

  @spec compile_nav() :: :ok

  defp compile_nav do
    IO.puts "Compiling main navigation HTML stub..."
    template = BuildDataStorage.get self(), "template", "nav"
    html = Renderer.render template, []
    BuildDataStorage.put self(), "navstub", html
  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
