anchor.diff:      end.
   
   wrongArgument('number', Option) ->
  -    io:format("~s: wrong number of arguments for option -~s\n",
  -        [?APP_STRING, Option]),
  -    init:stop(1);
  +    Msg = io_lib:format("wrong number of arguments for option -~s", [Option]),
  +    {'error', 'arguments', Msg};
   wrongArgument('type', Option) ->
  -    io:format("~s: wrong type of argument for option -~s\n",
  -        [?APP_STRING, Option]),
  -    init:stop(1).
  +    Msg = io_lib:format("wrong type of argument for option -~s", [Option]),
  +    {'error', 'arguments', Msg}.
   
   help() ->
       io:format(
  -     "usage: concuerror <command> [<args>]\n"
  +     "usage: concuerror [<args>]\n"
        "A Systematic Testing Framework for detecting\n"
        "Concurrency Errors in Erlang Programs\n"
        "\n"
  -     "Commands:\n"
  -     "  analyze         Analyze a specific target\n"
  -     "  show            Show the results of an analysis\n"
  -     "  gui             Run concuerror with graphics\n"
  -     "  help            Show this help message\n"
  -     "\n"
  -     "Analyze options:\n"
  +     "Arguments:\n"
        "  -t|--target module function [args]\n"
        "                          Specify the function to execute\n"
        "  -f|--files  modules     Specify the files (modules) to instrument\n"
  -     "  -o|--output file        Specify the output file (default results.ced)\n"
  +     "  -o|--output file        Specify the output file (default results.txt)\n"
        "  -p|--preb   number|inf  Set preemption bound (default is 2)\n"
        "  -I          include_dir Pass the include_dir to concuerror\n"
        "  --no-progress           Disable progress bar\n"
  -     "\n"
  -     "Show options:\n"
  -     "  --snapshot   file       Specify input (snapshot) file\n"
  -     "  -n           from..to   Specify which errors we want (default -all)\n"
  -     "  --all                   Show all errors\n"
  -     "  -d|--details            Show details about each error\n"
  +     "  --help                  Show this help message\n"
        "\n"
        "Examples:\n"
  -     "  concuerror analyze --target foo bar arg1 arg2 "
  -            "--files \"temp/foo.erl\" -o out.ced\n"
  -     "  concuerror show --snapshot out.ced --all\n"
  -     "  concuerror show --snapshot out.ced -n 1 4..end --details\n\n").
  +     "  concuerror --target foo bar arg1 arg2 "
  +        "--files \"temp/foo.erl\" -o out.txt\n\n").
   
   
   %%%----------------------------------------------------------------------
  
positive.code:     AtomParams = validateParams(Params, []),
      Target = {AtomModule, AtomFunc, AtomParams},
      NewOptions = lists:keystore(target, 1, Options, {target, Target}),
      action_analyze(Args, NewOptions);
  action_analyze([{Opt, _} | _Args], _Options)
          when (Opt =:= 't') orelse (Opt =:= '-target') ->
      %% Found --target option with wrong parameters
      wrongArgument('number', Opt);
  action_analyze([{Opt, []} | _Args], _Options)
          when (Opt =:= 'f') orelse (Opt =:= '-files') ->
      %% Found --files options without parameters
      wrongArgument('number', Opt);
  action_analyze([{Opt, Files} | Args], Options)
          when (Opt =:= 'f') orelse (Opt =:= '-files') ->
      %% Found --files option
      AbsFiles = lists:map(fun filename:absname/1, Files),
      NewOptions = keyAppend(files, 1, Options, AbsFiles),
      action_analyze(Args, NewOptions);
  action_analyze([{Opt, [File]} | Args], Options)
          when (Opt =:= 'o') orelse (Opt =:= '-output') ->
      %% Found --output option
      NewOptions = lists:keystore(snapshot, 1, Options, {snapshot, File}),
      action_analyze(Args, NewOptions);
  action_analyze([{Opt, _Files} | _Args], _Options)
          when (Opt =:= 'o') orelse (Opt =:= '-output') ->
      %% Found --output option with wrong parameters
      wrongArgument('number', Opt);
  action_analyze([{Opt, [Preb]} | Args], Options)
          when (Opt =:= 'p') orelse (Opt =:= '-preb') ->
      %% Found --preb option
      NewPreb =
  
negative.code:         end,
      %% Create analysis_options
      AnalysisOptions = [{preb, Preb}, {include, Include}],
      %% Start the analysis
      sched:analyze(Target, Files, AnalysisOptions).
  
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  
  %% Show details about each ticket
  showDetails(false, {I, Ticket}) ->
  