anchor.diff:                      PState = TraceEntry#state.passed_state,
                       InfectedMsg = epidemic_reply_msg(PState, From, To, Msg),
                       ?TRACE("delivering msg to execute: ~.0p~n", [InfectedMsg]),
  -                    comm:send(comm:make_global(To), InfectedMsg),
  +                    %% Send infected message with a shepherd. In case of send errors,
  +                    %% we will be informed by a {send_error, Pid, Msg, Reason} message.
  +                    comm:send(comm:make_global(To), InfectedMsg, [{shepherd, self()}]),
                       lists:keystore(TraceId, 1, State, {TraceId, NewEntry})
               end
       end;
  
positive.code:             _ = erlang:put(Key, Q),
              Queues
      end.
  
negative.code: on({on_handler_done, TraceId}, State) ->
      ?TRACE("on handler execution done~n", []),
      gen_component:post_op(State, {deliver, TraceId});
  
  on({send_error, _Pid, Msg, _Reason} = _ShepherdMsg, State) ->
      %% call on_handler_done and continue with message delivery
      TraceId = get_trace_id(get_passed_state(Msg)),
      ?TRACE("send error for trace id ~p: ~p calling on_handler_done~n", [TraceId, _ShepherdMsg]),
      gen_component:post_op(State, {on_handler_done, TraceId});
  
  on({get_infos, Client, TraceId}, State) ->
      case lists:keyfind(TraceId, 1, State) of
  