anchor.diff:      Dst = get_flu_config_dir(S),
       ok = file:rename(File, Dst ++ "/" ++ atom_to_list(FLU)),
       S.
  +
  +move_to_chain_config(Name, File, S) ->
  +    lager:info("Creating chain config file ~w\n", [Name]),
  +    Dst = get_chain_config_dir(S),
  +    ok = file:rename(File, Dst ++ "/" ++ atom_to_list(Name)),
  +    S.
  
positive.code:     lager:warning("Failed all attempts to bootstrap chain ~w via FLU ~w ",
                    [CD,FLU]),
      failed;
  bootstrap_chain2(#chain_def_v1{name=NewChainName, mode=CMode, full=Full,
                                 witnesses=Witnesses, props=Props}=CD,
                   FLU, N) ->
      All_p_srvrs = Witnesses ++ Full,
      L = [{Name, P_srvr} || #p_srvr{name=Name}=P_srvr <- All_p_srvrs],
      MembersDict = orddict:from_list(L),
      Mgr = machi_chain_manager1:make_chmgr_regname(FLU),
      PStore = machi_flu1:make_projection_server_regname(FLU),
      {ok, #projection_v1{epoch_number=OldEpoch, chain_name=OldChainName,
                          all_members=OldAll_list, witnesses=OldWitnesses}} =
          machi_projection_store:read_latest_projection(PStore, private),
      NewAll_list = [Name || #p_srvr{name=Name} <- All_p_srvrs],
      case set_chain_members(OldChainName, NewChainName,
                             OldAll_list, OldWitnesses,
                             NewAll_list, NewWitnesses,
                             Mgr, NewChainName, OldEpoch,
                             CMode, MembersDict, NewWitnesses) of
          ok ->
              lager:info("Bootstrapped chain ~w via FLU ~w to "
                         "mode=~w all=~w witnesses=~w\n",
                         [NewChainName, FLU, CMode, All_list, NewWitnesses]),
              AddedFLUs = NewAll_list -- OldAll_list,
              RemovedFLUs = OldAll_list -- NewAll_list,
              {ok, AddedFLUs, RemovedFLUs};
  
negative.code:             S
      end.
  
  process_pending_chain2(File, CD, LocalFLUs, _AddedFLUs, RemovedFLUs, S) ->
      %% AddedFLUs: no any extra work.
      %% RemovedFLUs: Stop the FLU, config -> j-i-c, data -> j-i-c
      case ordsets:intersection(ordsets:from_list(LocalFLUs),
                                ordsets:from_list(RemovedFLUs)) of
          [] ->
              ok;
          LocalRemovedFLUs ->
              %% Sleep for a little bit to allow HC to settle.
              timer:sleep(3000),
              [begin
                   %% We may be retrying this, so be liberal with any pattern
                   %% matching on return values.
                   _ = machi_flu_psup:stop_flu_package(FLU),
                   io:format(user, "TODO: move config ~s LINE ~p\n", [?MODULE, ?LINE]),
                   io:format(user, "TODO: move data ~s LINE ~p\n", [?MODULE, ?LINE]),
                   ok
               end || FLU <- LocalRemovedFLUs]
      end,
      #chain_def_v1{name=Name} = CD,
      _ = move_to_chain_config(Name, File, S),
      S.
  
  process_bad_files(Files, S) ->
  