anchor.diff:      Fun(Chunks),
       with_chunks(Fun, disk_log:chunk(?MODULE, Cont)).
   
  -copy_tasks_to_ring(Chunks, Ring) ->
  -    F = file_for_random_node(Ring),
  -    disk_log
  -    [ rpc:call(random_node(Ring), replayer_worker, append_task, [Chunk]) || Chunk <- Chunks ],
  +file_for_node(BaseDir, Node) ->
  +    BaseDir ++ atom_to_list(Node) ++ ".requests.disk_log".
  +
  +create_node_requests_file(BaseDir, Node) ->
  +    File = file_for_node(BaseDir, Node),
  +    disk_log:open([{name, File}, {file, File}, {repair, truncate}]).
  +
  +close_node_requests_file(BaseDir, Node) ->
  +    File = file_for_node(BaseDir, Node),
  +    disk_log:close(File).
  +
  +save_requests_to_file(Requests, Ring) ->
  +    [ rpc:call(random_node(Ring), replayer_worker, append_task, [R]) || R <- Requests ],
       ok.
   
  -random_node(Ring) -> hd(Ring). %FIXME: 
  +random_node(Ring) -> 
  +    random_element(Ring).
  +
  +random_element(Alternatives) ->
  +    N = length(Alternatives),
  +    R = element(3, now()),
  +    lists:nth((R rem N) + 1, Alternatives).
  +    
  +
  
positive.code:     start_link/0,
      change_tasks_file/1,
      change_ring/1,
      prepare/0,
      replay/1
  ]).
  
  -export_type([
  
negative.code:     Res = case disk_log:open([{name, ?MODULE}, {file, State#state.tasks_file}, {mode, read_only}]) of
          {error, _} = E -> E;
          _ ->
              {match, [BaseDir]} = re:run(State#state.tasks_file, "(.*/)", [{capture, [1], list}]),
              [ create_node_requests_file(BaseDir, Node) || Node <- Ring ],
              with_chunks(
                  fun(Chunks) -> save_requests_to_file(Chunks, Ring) end,
                  disk_log:chunk(?MODULE, start)),
              disk_log:close(?MODULE),
              [ close_node_requests_file(BaseDir, Node) || Node <- Ring ],
              send_files_to_nodes(BaseDir, Ring),
              ok
      end,
      {reply, Res, State};
  