anchor.diff:  	    ok = file:close(Fd),
   	    remove_debug(log_to_file, Debug)
       end.
  +
  +%%-----------------------------------------------------------------
  +%% Keep the last N Log functions
  +%%-----------------------------------------------------------------
  +
  +nlog_new() ->
  +    nlog_new(10).
  +%%
  +nlog_new(N) when is_integer(N) ->
  +    {N, []};
  +nlog_new(NLog) ->
  +    nlog_new(10, NLog).
  +%%
  +nlog_new(NewN, {_N, R}) ->
  +    {NewN, trim(NewN, R)}.
  +
  +nlog_put(Item, {N, R}) ->
  +    {N, [Item | trim(N, R)]}.
  +
  +nlog_get({_N, R}) ->
  +    lists:reverse(R).
   
   %%-----------------------------------------------------------------
   %% Func: debug_options/1
  
positive.code: debug_options([trace | T], Debug) ->
      debug_options(T, install_debug(trace, true, Debug));
  debug_options([log | T], Debug) ->
      debug_options(T, install_debug(log, {10, []}, Debug));
  debug_options([{log, N} | T], Debug) when is_integer(N), N > 0 ->
      debug_options(T, install_debug(log, {N, []}, Debug));
  debug_options([statistics | T], Debug) ->
      debug_options(T, install_debug(statistics, init_stat(), Debug));
  debug_options([{log_to_file, FileName} | T], Debug) ->
  
negative.code: debug_cmd({trace, false}, Debug) ->
      {ok, remove_debug(trace, Debug)};
  debug_cmd({log, true}, Debug) ->
      NLog = get_debug(log, Debug, nlog_new()),
      {ok, install_debug(log, nlog_new(NLog), Debug)};
  debug_cmd({log, {true, N}}, Debug) when is_integer(N), 1 =< N ->
      NLog = get_debug(log, Debug, nlog_new(N)),
      {ok, install_debug(log, nlog_new(N, NLog), Debug)};
  debug_cmd({log, false}, Debug) ->
      {ok, remove_debug(log, Debug)};
  debug_cmd({log, print}, Debug) ->
      print_log(Debug),
      {ok, Debug};
  debug_cmd({log, get}, Debug) ->
      NLog = get_debug(log, Debug, nlog_new()),
      {{ok, nlog_get(NLog)}, Debug};
  debug_cmd({log_to_file, false}, Debug) ->
      NDebug = close_log_file(Debug),
      {ok, NDebug};
  