anchor.diff:                  [] ->
                       halt(0);
                   _ ->
  -                    lists:foreach(fun riaknostic_check:print/1, SortedMessages),
  +		    case application:get_env(riaknostic, terms) of
  +			{ok, true} ->
  +			    write_list(SortedMessages);
  +			undefined ->		    
  +			    lists:foreach(fun riaknostic_check:print/1, SortedMessages)
  +		    end,
                       halt(1)
               end
       end.
   
  +write_list(MessageList) ->
  +    case application:get_env(riaknostic, term_target) of
  +	{ok, stdin} -> io:format("~w", [{riaknostic_report, ?MR_OUTPUT_VSN, MessageList}]);
  +	{ok, Path}  -> {ok, Fh} = file:open(filename:absname(Path), [write]), 
  +		       io:format(Fh, "~w", [{riaknostic_report, ?MR_OUTPUT_VSN, MessageList}]),
  +		       file:close(Fh)
  +    end.
  +		
   validate_checks(Check, {Mods, SNames}) ->
       case lists:keyfind(Check, 1, SNames) of
           {Check, Mod} ->
  
positive.code: -export([main/1]).
  
  -define(OPTS, [
                 {etc,   undefined, "etc",   string,         undefined                                         },
                 {base,  undefined, "base",  string,         undefined                                         },
                 {user,  undefined, "user",  string,         undefined                                         },
                 {level, $d,        "level", {atom, notice}, "Minimum message severity level (default: notice)"},
                 {list,  $l,        "list",  undefined,      "Describe available diagnostic tasks"             },
                 {usage, $h,        "help",  undefined,      "Display help/usage"                              }
                ]).
  
  -define(USAGE_OPTS, [ O || O <- ?OPTS,
                             element(5,O) =/= undefined]).
  
  %% @doc The main entry point for the riaknostic escript.
  -spec main(CommandLineArguments::[string()]) -> any().
  
negative.code: process_option(list, _) ->
      list;
  process_option(usage, _) ->
      usage;
  process_option(terms, Result) ->
      process_option({terms, stdin}, Result);
  process_option({terms, Path}, Result) ->
      application:set_env(riaknostic, terms, true),
      application:set_env(riaknostic, term_target, Path),
      Result.
  