anchor.diff:            file :: file:io_device(),
             file_size :: integer(),
             file_inode :: integer(),
  +          parent :: pid(),
   
             rotation_size :: non_neg_integer(),
             rotation_num_files :: pos_integer(),
  
positive.code: 
  
      WorkerState = #worker_state{path = Path,
                                  rotation_size = RotSize,
                                  rotation_num_files = RotNumFiles,
                                  rotation_compress = RotCompress,
  
negative.code:     {ok, State}.
  
  %% internal functions
  log_msg(_Msg, #state{buffer_overflow = true,
                       dropped_messages = Dropped} = State)->
      State#state{dropped_messages = Dropped + 1};
  log_msg(_Msg, #state{buffer_size = BufferSize,
                       outstanding_size = OutstandingSize,
                       buffer_size_max = BufferSizeMax} = State)
    when BufferSize + OutstandingSize >= BufferSizeMax ->
      Msg = <<"Dropping consequent messages on the floor because of buffer overflow\n">>,
      do_log_msg(Msg, State#state{buffer_overflow = true,
                                  dropped_messages = 1});
  log_msg(Msg, State) ->
      do_log_msg(Msg, State).
  
  do_log_msg(Msg, #state{buffer = Buffer,
                         buffer_size = BufferSize} = State) ->
      NewBuffer = <<Buffer/binary, Msg/binary>>,
      NewBufferSize = BufferSize + byte_size(Msg),
  
  