anchor.diff:  %%%
   
   read_configs() -> 
  -    read_main_config(),
  -    read_other_configs().
  -
  -
  -read_other_configs() ->
  -    read_other_configs(get_(config_path, undefined)). 
  -
  -read_other_configs(undefined) ->
  -    error_logger:error_msg("no configuration path found, path scanned are
  -                           ~p",[generate_path_list()]),
  -    erlang:halt(2);
  -read_other_configs(Path) ->
  -    ok = apply_main_settings(),
  -    ok = read_op_config(Path),
  -    ok = set_oidc_ops(),
  -    ok = start_cowboy(),
  -    ok.
  +    ok = read_main_config(),
  +    ok = read_plugin_configs(),
  +    ok = start_cowboy().
  +
   
   
   read_main_config() ->
       Files = generate_file_list("main.conf"),
  -    register_files(main,Files).
  +    ok = register_files(main,Files),
  +    ok = ensure_config_found(),
  +    ok = apply_main_settings().
  +
  +ensure_config_found() ->
  +    ensure_config_found(get_(config_path, undefined)).
  +
  +ensure_config_found(undefined) ->
  +    return_error(2,"no configuration path found, path scanned are ~p",[generate_path_list()]);
  +ensure_config_found(_Defined) ->
  +    ok.
  +
  +read_plugin_configs() ->
  +    read_plugin_configs(get_(config_path, undefined)). 
  +
  +read_plugin_configs(_Path) ->
  +    % TODO: implement
  +    ok.
  +
  +return_error(Number, Format, Params) ->
  +    error_logger:error_msg(Format,Params),
  +    erlang:halt(Number).
  +
   
   apply_main_settings() ->
       HostName = get_binary_value(main,"","HostName","localhost"),
  
positive.code:     LPort = local_port(),
      LocalEndpoint = << LProt/binary, HostName/binary, LPort/binary, EpReturn/binary >>, 
      set_config(local_endpoint,LocalEndpoint),
      apply_idh_settings(),
      ok.
  
  apply_idh_settings() ->
      Type = get_string_value(main,"IDH","Type",undefined),
  
negative.code:     ok.
      
  
  
  register_files(Name,Files) ->
      register_single_config(Name,only_first(Files)).  
  