 
   def cast(pid, method, params, context, cb) when is_pid(pid) do
     st = Agent.get pid, &(&1)
-    Logger.debug("Method #{method} caller pid #{inspect pid}, in #{inspect (Map.keys st.methods)} #{inspect Enum.map(st.mc, fn {f, options} -> Keyword.get options, :name, (inspect f) end) }")
+    #Logger.debug("Method #{method} caller pid #{inspect pid}, in #{inspect (Map.keys st.methods)} #{inspect Enum.map(st.mc, fn {f, options} -> Keyword.get options, :name, (inspect f) end) }")
     case Map.get st.methods, method do
       {f, options} ->
         # Calls the function and the callback with the result, used in async and sync.

        Logger.error("#{Exception.format :error, other}")
        {:error, other}
    end
    Logger.debug("Method #{method} caller function #{inspect f} -> #{inspect ret}.")

    cb_params = case ret do
      {:ok, ret} -> {:ok, ret}

                #Logger.debug("Calling without context #{inspect f}")
                f.(params)
              end
              #Logger.debug("Method #{method} caller function #{inspect f} -> #{inspect v}.")
              case v do
                {:error, e} ->
                  cb.({:error, e })
