anchor.diff:                      error_logger:error_msg("Failed to read file ~p: ~p\n", [FName, Reason]),
                       QueuePid ! {next_file, self(), 0}
               end,
  -            index_worker_loop(QueuePid, Client, AnalyzerPid, IndexFsmPid, Index, DefaultField)
  +            index_worker_loop(QueuePid, Client, AnalyzerPid, IndexFsmPid, Index, DefaultField);
  +        stop ->
  +            stop
  +    after ?WORKER_TIMEOUT ->
  +            stop
       end.
  
positive.code: 
      %% Spawn a bunch of workers
      Self = self(),
      [spawn_link(fun() -> index_worker_loop0(Self, Index) end) || _ <- lists:seq(1,Workers)],
  
      %% Initialize status and start processing files
      Status = #index_status {total_files = TotalFiles,
                              total_bytes = TotalBytes,
                              start_time  = now(),
                              last_status_time = now()},
      index_master_loop(list_dir(Dir), Status, StatusFn).
  
  
  
  index_master_loop([], Status, StatusFn) ->
      StatusFn(Status),
      ok;
  index_master_loop([FName | Rest], Status, StatusFn) ->
      TimeSinceUpdate = timer:now_diff(now(), Status#index_status.last_status_time) / 1000,
      NewStatus = case TimeSinceUpdate > ?STATUS_INTERVAL of
  
negative.code: %% Internal functions
  %% ===================================================================
  
  console_status(done) ->
      io:format("Finished indexing.\n");
  console_status(Status) ->
      ElapsedSecs = timer:now_diff(now(), Status#index_status.start_time) / 1000000,
      AvgKbSec = (Status#index_status.processed_bytes / ElapsedSecs) / 1024,
  