anchor.diff:  tag_event(Event) ->    
       {erlang:localtime(), Event}.
   
  -write_events(Events) -> write_events1(lists:reverse(Events)).
  -
  -write_events1([Event|Es]) ->
  -    write_event(Event),
  -    write_events1(Es);
  -write_events1([]) ->
  +write_events(Events,IOMod) -> write_events1(lists:reverse(Events),IOMod).
  +
  +write_events1([Event|Es],IOMod) ->
  +    write_event(Event,IOMod),
  +    write_events1(Es,IOMod);
  +write_events1([],_IOMod) ->
       ok.
   
  -write_event({Time, {error, _GL, {Pid, Format, Args}}}) ->
  +write_event({Time, {error, _GL, {Pid, Format, Args}}},IOMod) ->
       T = write_time(maybe_utc(Time)),
       case catch io_lib:format(add_node(Format,Pid), Args) of
   	S when is_list(S) ->
  -	    format(T ++ S);
  +	    format(IOMod, T ++ S);
   	_ ->
   	    F = add_node("ERROR: ~p - ~p~n", Pid),
  -	    format(T ++ F, [Format,Args])
  -    end;
  -write_event({Time, {emulator, _GL, Chars}}) ->
  +	    format(IOMod, T ++ F, [Format,Args])
  +    end;
  +write_event({Time, {emulator, _GL, Chars}},IOMod) ->
       T = write_time(maybe_utc(Time)),
       case catch io_lib:format(Chars, []) of
   	S when is_list(S) ->
  -	    format(T ++ S);
  -	_ ->
  -	    format(T ++ "ERROR: ~p ~n", [Chars])
  -    end;
  -write_event({Time, {info, _GL, {Pid, Info, _}}}) ->
  -    T = write_time(maybe_utc(Time)),
  -    format(T ++ add_node("~p~n",Pid),[Info]);
  -write_event({Time, {error_report, _GL, {Pid, std_error, Rep}}}) ->
  +	    format(IOMod, T ++ S);
  +	_ ->
  +	    format(IOMod, T ++ "ERROR: ~p ~n", [Chars])
  +    end;
  +write_event({Time, {info, _GL, {Pid, Info, _}}},IOMod) ->
  +    T = write_time(maybe_utc(Time)),
  +    format(IOMod, T ++ add_node("~p~n",Pid),[Info]);
  +write_event({Time, {error_report, _GL, {Pid, std_error, Rep}}},IOMod) ->
       T = write_time(maybe_utc(Time)),
       S = format_report(Rep),
  -    format(T ++ S ++ add_node("", Pid));
  -write_event({Time, {info_report, _GL, {Pid, std_info, Rep}}}) ->
  +    format(IOMod, T ++ S ++ add_node("", Pid));
  +write_event({Time, {info_report, _GL, {Pid, std_info, Rep}}},IOMod) ->
       T = write_time(maybe_utc(Time), "INFO REPORT"),
       S = format_report(Rep),
  -    format(T ++ S ++ add_node("", Pid));
  -write_event({Time, {info_msg, _GL, {Pid, Format, Args}}}) ->
  +    format(IOMod, T ++ S ++ add_node("", Pid));
  +write_event({Time, {info_msg, _GL, {Pid, Format, Args}}},IOMod) ->
       T = write_time(maybe_utc(Time), "INFO REPORT"),
       case catch io_lib:format(add_node(Format,Pid), Args) of
   	S when is_list(S) ->
  -	    format(T ++ S);
  +	    format(IOMod, T ++ S);
   	_ ->
   	    F = add_node("ERROR: ~p - ~p~n", Pid),
  -	    format(T ++ F, [Format,Args])
  -    end;
  -write_event({Time, {warning_report, _GL, {Pid, std_warning, Rep}}}) ->
  +	    format(IOMod, T ++ F, [Format,Args])
  +    end;
  +write_event({Time, {warning_report, _GL, {Pid, std_warning, Rep}}},IOMod) ->
       T = write_time(maybe_utc(Time), "WARNING REPORT"),
       S = format_report(Rep),
  -    format(T ++ S ++ add_node("", Pid));
  -write_event({Time, {warning_msg, _GL, {Pid, Format, Args}}}) ->
  +    format(IOMod, T ++ S ++ add_node("", Pid));
  +write_event({Time, {warning_msg, _GL, {Pid, Format, Args}}},IOMod) ->
       T = write_time(maybe_utc(Time), "WARNING REPORT"),
       case catch io_lib:format(add_node(Format,Pid), Args) of
   	S when is_list(S) ->
  -	    format(T ++ S);
  +	    format(IOMod, T ++ S);
   	_ ->
   	    F = add_node("ERROR: ~p - ~p~n", Pid),
  -	    format(T ++ F, [Format,Args])
  -    end;
  -write_event({_Time, _Error}) ->
  +	    format(IOMod, T ++ F, [Format,Args])
  +    end;
  +write_event({_Time, _Error},_IOMod) ->
       ok.
   
   maybe_utc(Time) ->
  
positive.code: 	     PrevHandler, go_back}
      end;
  handle_info({emulator, GL, Chars}, State) when node(GL) == node() ->
      write_event(tag_event({emulator, GL, Chars})),
      {ok, State};
  handle_info({emulator, noproc, Chars}, State) ->
      write_event(tag_event({emulator, noproc, Chars})),
      {ok, State};
  handle_info(_, State) ->
      {ok, State}.
  
negative.code: %%
  %% %CopyrightBegin%
  %% 
  %% Copyright Ericsson AB 1996-2011. All Rights Reserved.
  %% 
  %% The contents of this file are subject to the Erlang Public License,
  %% Version 1.1, (the "License"); you may not use this file except in
  