anchor.diff:  %% -------------------------------------------------------------------- %%
   
   terminate(_Reason, #state{ fd = undefined }) ->
  -    set_pattern_trace(false, {'_','_','_'}),
  +    ok = set_pattern_trace(false, ?default_pattern),
       ok;
   terminate(_Reason, #state{ fd = Fd }) ->
  -    file:close(Fd),
  -    set_pattern_trace(false, {'_','_','_'}),
  +    ok = file:close(Fd),
  +    ok = set_pattern_trace(false, ?default_pattern),
       ok.
   
   %% -------------------------------------------------------------------- %%
  
positive.code: start() -> gen_server:start({local, ?MODULE}, ?MODULE, [], []).
  stop()  -> gen_server:call(?MODULE, stop, infinity).
  
  profile(Fun) when is_function(Fun) ->
      profile([], Fun);
  profile(Rs) when is_list(Rs) ->
      start_profiling(Rs).
  
  profile(Pids, Fun) ->
      profile(Pids, Fun, {'_','_','_'}).
  
  profile(Pids, Fun, Pattern) ->
      profile(Pids, erlang, apply, [Fun,[]], Pattern).
  
  profile(Pids, M, F, A) ->
      profile(Pids, M, F, A, {'_','_','_'}).
  
  profile(Pids, M, F, A, Pattern) ->
      start(),
      gen_server:call(?MODULE, {profile,Pids,Pattern,M,F,A},infinity).
  
  dump() -> 
      gen_server:call(?MODULE, dump, infinity).
  
  analyze() ->
      analyze(procs).
  
negative.code:     {noreply, S};
  handle_info({'EXIT', _, Reason}, #state{ reply = FromTag } = S) ->
  
      _  = set_process_trace(false, S#state.rootset, S#state.trace_opts),
      ok = set_pattern_trace(false, S#state.pattern),
  
      gen_server:reply(FromTag, {error, Reason}),
      {noreply, S#state{
  	profiling  = false,
  	rootset    = [],
  	trace_opts = [],
  	pattern    = ?default_pattern
      }};
  
  % check if Pid is spawned process?
  handle_info({_Pid, {answer, Result}}, #state{ reply = {From,_} = FromTag} = S) ->
  
      ok   = set_pattern_trace(pause, S#state.pattern),
      Bpd  = collect_bpd(),
      _    = set_process_trace(false, S#state.rootset, S#state.trace_opts),
      ok   = set_pattern_trace(false, S#state.pattern),
  
      catch unlink(From),
      gen_server:reply(FromTag, {ok, Result}),
      {noreply, S#state{
  	profiling  = false,
  	rootset    = [],
  	trace_opts = [],
  	pattern    = ?default_pattern,
  	bpd        = Bpd
      }}.
  
  %% -------------------------------------------------------------------- %%
  