   def handle_info({:EXIT, pid, _reason}, state = %__MODULE__{processes: processes}) do
     new_state = case processes |> Map.get(pid) do
       nil -> Logger.error ("Unknown linked pid #{inspect pid}")
+             Logger.error "State: #{inspect state}"
              state
       url -> EventCenter.sync_notify({:worker, :execute, {:crashed, url}})
              %__MODULE__{state | processes: processes |> Map.delete(pid)}

    :ok = Coordinator.register(self)
    :ok = Coordinator.update_capabilities(self, detect_capabilities())
    ref = Process.monitor(GenServer.whereis(Coordinator.name))
    state = %__MODULE__{coordinator: coordinator, coordinator_ref: ref}
    {:ok, state}
  end


  def handle_call({:execute, url, bmf}, from, state = %__MODULE__{processes: processes}) do
    ref = make_ref()
    EventCenter.sync_notify({:worker, :execute, {:start, url}})
    {state, workspace} = workspace_path(state)
    {:ok, exec_pid} = Task.start_link(fn ->
      EventCenter.sync_notify({:worker_job, :spawned, self})
      {out, rc} = execute_bmf(url, bmf, workspace)
      case rc do
        0 -> EventCenter.sync_notify({:worker, :execute, {:ok, url}})
        _ -> EventCenter.sync_notify({:worker, :execute, {:error, url}})
