anchor.diff:  remove_token_drain_data(DrainId) ->
       case logplex_drain:lookup(DrainId) of
           undefined ->
  -            error_logger:error_msg("~p ~p ~p ~p~n", [?MODULE, remove_token_drain_data, undefined_drain, DrainId]);
  +            io:format("Error ~p ~p ~p ~p~n", [?MODULE, remove_token_drain_data, undefined_drain, DrainId]);
           Drain ->
               case ets:match_object(tokens, #token{id='_', channel_id=Drain#drain.channel_id, name='_', app_id='_', addon='_', drains='_'}) of
                   [] ->
  -                    error_logger:error_msg("~p ~p ~p ~p~n", [?MODULE, remove_token_drain_data, undefined_tokens, Drain]);
  +                    io:format("Error ~p ~p ~p ~p~n", [?MODULE, remove_token_drain_data, undefined_tokens, Drain]);
                   Tokens ->
                       ets:insert(tokens, [begin
                           Drains1 = lists:filter(fun(#drain{id=Id}) -> Id =/= DrainId end, Drains),
  
positive.code: populate_token_drain_data([Drain|Tail]) when is_record(Drain, drain) ->
      case ets:match_object(tokens, #token{id='_', channel_id=Drain#drain.channel_id, name='_', app_id='_', addon='_', drains='_'}) of
          [] ->
              error_logger:error_msg("~p ~p ~p ~p~n", [?MODULE, populate_token_drain_data, undefined_tokens, Drain]);
          Tokens ->
              Drain1 = Drain#drain{resolved_host=logplex_utils:resolve_host(Drain#drain.host)},
              ets:insert(tokens, [Token#token{drains=[Drain1|Drains]} || #token{drains=Drains}=Token <- Tokens])
  
negative.code: create_drain(Id, Dict) ->
      case dict_find(<<"ch">>, Dict) of
          undefined ->
              io:format("Error ~p ~p ~p ~p ~p~n", [?MODULE, create_drain, missing_ch, Id, dict:to_list(Dict)]);
          Val1 ->
              Ch = list_to_integer(binary_to_list(Val1)),
              case dict_find(<<"port">>, Dict) of
                  undefined ->
                      io:format("Error ~p ~p ~p ~p ~p~n", [?MODULE, create_drain, missing_port, Id, dict:to_list(Dict)]);
                  Val2 ->
                      Port = list_to_integer(binary_to_list(Val2)),
                      case dict_find(<<"host">>, Dict) of
                          undefined ->
                              io:format("Error ~p ~p ~p ~p ~p~n", [?MODULE, create_drain, missing_host, Id, dict:to_list(Dict)]);
                          Host ->
                              Drain = #drain{
                                  id=Id,
  