anchor.diff:      MsgBufN = dict:store(JobName, {NMsg + 1, LstLen, MsgLst}, MsgBuf),
       if
           Event =:= none ->
  -            {Events, MsgBufN};
  +            S#state{events = Events, msgbuf = MsgBufN};
           true ->
               {ok, JE} = dict:find(JobName, Events),
  -            {dict:store(JobName, update_job_ent(JE, Event), Events),
  -             MsgBufN}
  +            EventsN = dict:store(JobName, update_job_ent(JE, Event), Events),
  +            S#state{events = EventsN, msgbuf = MsgBufN}
       end.
   
   -spec do_job_done(jobname(), state()) -> state().
  -do_job_done(JobName, {Events, MsgBuf} = S) ->
  +do_job_done(JobName, #state{msgbuf = MsgBuf} = S) ->
       case ets:lookup(event_files, JobName) of
           [] ->
               ok;
  
positive.code:     end,
      case dict:find(JobName, MsgBuf) of
          error -> S;
          {ok, _} -> {Events, dict:erase(JobName, MsgBuf)}
      end.
  
  % Flush events from memory to file using a per-job process.
  
negative.code: % the zombie job.
  handle_cast({job_done, JobName}, S) ->
      {noreply, do_job_done(JobName, S)};
  handle_cast({clean_job, JobName}, S) ->
      #state{events = Events} = S1 = do_job_done(JobName, S),
      delete_jobdir(JobName),
      {noreply, S1#state{events = dict:erase(JobName, Events)}}.
  
  -spec handle_info(term(), state()) -> gs_noreply().
  handle_info(Msg, State) ->
  