anchor.diff:      {ok, State}.
   
   handle_info({'DOWN', MonitorRef, _Type, Pid, _Info}, Fd) ->
  -    MonitorRef = erase(Pid),
  +    {MonitorRef, _RefCount} = erase(Pid),
       maybe_close_async(Fd);
   handle_info(Info, Fd) ->
       exit({error, {Info, Fd}}).
  
positive.code:     catch unlink(Pid),
      maybe_close_async(Fd);
  handle_cast({drop_ref, Pid}, Fd) ->
      % don't check return of demonitor. The process could haved crashed causing
      % the {'DOWN', ...} message to be sent and the process unmonitored.
      erlang:demonitor(erase(Pid), [flush]),
      maybe_close_async(Fd).
  
  
  
negative.code:     {ok, Pos} = file:position(Fd, eof),
      {reply, {file:pwrite(Fd, Pos, Bin2), Pos}, Fd};
  handle_call({pread_bin, Pos}, _From, Fd) ->
      {ok, <<TermLen:32>>} = file:pread(Fd, Pos, 4),
      {ok, Bin} = file:pread(Fd, Pos + 4, TermLen),
      {reply, {ok, Bin}, Fd};
  handle_call({add_ref, Pid},_From, Fd) ->
      case get(Pid) of
      undefined ->
          put(Pid, {erlang:monitor(process, Pid), 1});
      {MonRef, RefCnt} ->
          put(Pid, {MonRef, RefCnt + 1})
      end,
      {reply, ok, Fd};
  handle_call(num_refs, _From, Fd) ->
      {monitors, Monitors} =  process_info(self(), monitors),
  