anchor.diff:                                     fun({Key, Value}, {FStr, FVars}) ->
                                              {FStr ++ "~p(~p), ", FVars ++ [Key, Value]}
                                      end, {"~p@~p: ", [State#state.id, Now]}, Elements),
  -    lager:debug([{class, wtp_statistics}], FormatString, FormatVars),
  +    EventData = io_lib:format(FormatString ++ "~n", FormatVars),
  +    ok = file:write(State#state.event_log, EventData),
       next_state(run, State1);
   
   run(Event, State) ->
  
positive.code: stop_trace(undefined) ->
      ok;
  stop_trace(Trace) ->
      ok = lager:stop_trace(Trace).
  
  socket_close({udp, Socket}) ->
      capwap_udp:close(Socket);
  
negative.code:             EventLogPath = filename:join([EventLogBasePath, ["events-", erlang:binary_to_list(CommonName), ".log"]]),
              lager:info("EventLogP: ~w", [EventLogPath]),
  
              ok = filelib:ensure_dir(EventLogPath),
              {ok, EventLog} = file:open(EventLogPath, [append]),
              State1 = State#state{event_log=EventLog, socket = {dtls, SslSocket}, session = Session, id = CommonName},
              %% TODO: find old connection instance, take over their StationState and stop them
              next_state(idle, State1);
          Other ->
  