anchor.diff:      end,
       State;
   
  +%% In case of an emergency, we check immediately
  +handle_msg({emergency, LoadInfo, DirKey}, State) ->
  +    %% TODO just write directly to db instead
  +    post_load_to_directory(LoadInfo, DirKey),
  +    %% TODO Emergency Threshold has been already check at the node overloaded...
  +    EmergencyThreshold = State#state.threshold_emergency,
  +    case LoadInfo#node.utilization > EmergencyThreshold of
  +        true  ->
  +            MyDirKeys = State#state.my_dirs,
  +            directory_routine(DirKey, emergency);
  +        false -> State
  +    end;
  +
   handle_msg({directory_trigger}, State) ->
       trigger(directory_trigger),
  -    MyDirectories = State#state.my_dirs,
  -    %Reassignments = [balance(Dir) || Dir <- MyDirectories],
  -    %PeriodicThreshold =
  +    ?TRACE("~p My Directories: ~p~n", [self(), State#state.my_dirs]),
       %% Threshold k_p = Average laod in directory
       %% Threshold k_e = 1 meaning full capacity
       %% Upon receipt of load information:
  
positive.code: 
  -type utilization() :: float().
  
  -record(node, {utilization = ?required(node, utilization)    :: utilization(),
                 capacity = 1                                  :: number(),
                 load     = ?required(node, load)              :: number(),
                 pid      = ?required(node, pid)               :: comm:mypid()
                 }).
  
  -type directory_name() :: string().
  
  -record(directory, {name         = ?required(directory, name) :: directory_name(), 
                      last_balance = nil                        :: nil | os:timestamp(),
                      pool         = gb_sets:new()              :: gb_set()
                      %light_nodes  = []                         :: [node()],
                      %heavy_nodes  = []                         :: [node()]
                      }).
  
  -record(state, {capacity = 1500, %% free cpu usage, free memory, bandwith...
                  my_dirs = [],
  
negative.code: create_directories(0) ->
      ok;
  create_directories(N) when N > 0 ->
      Key = int_to_str(get_directory_key_by_number(N)),
      TLog = api_tx:new_tlog(),
  
      case api_tx:read(TLog, Key) of
  