anchor.diff:      %% get full node list.  Write this to a nodes to migrate file
       NodeList = chef_otto:fetch_nodes_with_ids(S, OrgId),
       log(info, OrgName, "found ~B nodes", [length(NodeList)]),
  -    NodesToMigrate = << <<Name/binary, "\n">> || {Name, _} <- NodeList >>,
  -    file:write_file(<<LogDir/binary, "/nodes_to_migrate.txt">>, NodesToMigrate),
  -    
  -    {next_state, migrate_nodes,
  -     State#state{node_list = safe_split(BatchSize, NodeList)}, 0}.
  +    log_node_names(LogDir, NodeList),
  +    State1 = State#state{node_list = safe_split(BatchSize, NodeList),
  +                         couch_nodes = NodeList},
  +    {next_state, migrate_nodes, State1, 0}.
       
   migrate_nodes(timeout, #state{node_list = {[], []}}=State) ->
       {next_state, mark_migration_end, State, 0};
  
positive.code:     {next_state, migrate_nodes,
       State#state{node_list = safe_split(BatchSize, NodeList)}, 0}.
  
  mark_migration_end(timeout, #state{org_name = OrgName}=State) ->
      log(info, OrgName, "migration complete"),
      {stop, normal, State}.
      
  handle_event(_Event, StateName, State) ->
      {next_state, StateName, State}.
  
negative.code:                 chef_otto,
                  node_count = 0,
                  node_list = [],
                  couch_nodes = [],
                  node_marker,
                  redis,
                  log_dir}).
  