anchor.diff:  -compile({no_auto_import,[error/1, error/2]}).
   
   -record (params, {
  -  command   = undefined,
  -  app_file,
  -  root_dir  = undefined,
  -  port      = 5001,
  -  args      = []
  -}).
  +           command   = undefined,
  +           app_file,
  +           root_dir  = undefined,
  +           port      = 5001,
  +           args      = []
  +          }).
   
   -export ([start/0]).
   
  
positive.code:   start_it_up(),
    case babysitter_integration:command(Command, App, Bee, CliArgs) of
      {ok, OsPid, ExitCode} ->
  io:format("
    Ran the babysitter command: ~p
      Ran with the OSPid of: ~p
      Exit code: ~p
    ", [Command, OsPid, ExitCode]);
      {ok, ErlPid, OsPid, Model} ->
  io:format("
    Successfully executed the command: ~p
      Ran with the OSPid of: ~p and erlang pid: ~p
      Bee id: ~p
    ", [Command, OsPid, ErlPid, Model]);
      {error, Phase, OsPid, ExitCode, StdOut, StdErr} ->
  io:format("
    Command ~p failed at the stage: ~p
      Ran with the OSPid of: ~p
      Exit code: ~p
      Stdout: ~s
      Stderr: ~s
    ", [Command, Phase, OsPid, ExitCode, StdOut, StdErr]);
    {error, no_command} ->
  io:format("
    No command is described in the application type for this app~n
  ", [])
    end,
    shut_it_down().
  
  %% INTERNAL
  
  start_it_up() ->
    % application:start(sasl),
    application:start(babysitter),
    node_manager:read_babysitter_config().
  
  shut_it_down() ->
    application:stop(babysitter).
  
  parse_args([ "-h" | _Rest], _Params) -> show_usage();
  parse_args([ "-a", AppFile | Rest], Params) -> parse_args(Rest, Params#params{app_file = AppFile});
  parse_args([ "-d", Dir | Rest], Params) -> parse_args(Rest, Params#params{root_dir = Dir});
  parse_args([ "-p", Port | Rest], Params) -> parse_args(Rest, Params#params{port = list_to_integer(Port)});
  parse_args([H | Rest], #params{command = undefined} = Params) ->
    parse_args(Rest, Params#params{command = list_to_atom(H)});
  parse_args([H | Rest], #params{args = CurrArgs} = Params) ->
  
negative.code:   io:format("
      Usage: beehive_control [OPTIONS] COMMAND
  
              OPTIONS
              -h                              Display this message
              -a [file]                       File to load app descriptors
              -b [file]                       File to load bee descriptors
              -l                              Local node to connect
  
              COMMANDS
              stop                            Stop the beehive server entirely
              app_updated [NameOfApp]         Marks an application as updated
              set_seed [SeedNode]             Set a new seed
              get_seed                        Get the seed node
              reload                          Reload the beehive system
              list [Type (optional)]          List types (valid types: router, storage, node or nothing)
  
              ", []),
  halt(1).
  
  error(Msg) ->
  