 
   @impl GenServer
   def init(_args) do
-    {:ok, %{mute_msg: false, mute_err: false}}
+    prefix = if IO.ANSI.enabled?(), do: "\r", else: ""
+
+    {:ok, %{mute_msg: false, mute_err: false, prefix: prefix}}
   end
 
   @impl GenServer

  end

  def handle_call({:put_msg, category, msg}, _, state) do
    unless(state.mute_msg, do: IO.puts(format_message(category, msg)))

    {:reply, :ok, state}
  end

  def handle_call({:put_err, category, msg}, _, state) do
    unless(state.mute_err, do: IO.puts(:stderr, format_message(category, msg)))

    {:reply, :ok, state}
  end

        |> IO.iodata_to_binary()
        |> format_newlines()

      [header, ?\s, :io_lib.format(body_fmt, [formatted_msg])]
    end
  end)

