anchor.diff:  io_request({put_chars, Enc, Chars}, 
   	   #state{handle=Handle,buf=Buf}=State) ->
       case position(Handle, cur, Buf) of
  -	{error,_}=Reply ->
  -	    {stop,normal,Reply,State};
  +	{error,Reason}=Reply ->
  +	    {stop,Reason,Reply,State};
   	_ ->
   	    put_chars(Chars, Enc, State#state{buf= <<>>})
       end;
  
positive.code: put_chars(Chars, latin1, #state{handle=Handle, unic=latin1}=State) ->
      NewState = State#state{buf = <<>>},
      case ?PRIM_FILE:write(Handle, Chars) of
  	{error,_}=Reply ->
  	    {stop,normal,Reply,NewState};
  	Reply ->
  	    {reply,Reply,NewState}
      end;
  
negative.code: 	     #state{buf= <<>>}=State)
    when At =:= cur;
         At =:= {cur,0} ->
      put_chars(Data, latin1, State);
  file_request({pwrite,At,Data}, 
  	     #state{handle=Handle,buf=Buf}=State) ->
      case position(Handle, At, Buf) of
  	{error,_} = Reply ->
  	    {error,Reply,State};
  	_ ->
  	    put_chars(Data, latin1, State)
      end;
  file_request(datasync,
  	     #state{handle=Handle}=State) ->
      case ?PRIM_FILE:datasync(Handle) of
  	{error,Reason}=Reply ->
  	    {stop,Reason,Reply,State};
  	Reply ->
  	    {reply,Reply,State}
      end;
  file_request(sync, 
  	     #state{handle=Handle}=State) ->
      case ?PRIM_FILE:sync(Handle) of
  	{error,Reason}=Reply ->
  	    {stop,Reason,Reply,State};
  	Reply ->
  	    {reply,Reply,State}
      end;
  file_request(close, 
  	     #state{handle=Handle}=State) ->
      case ?PRIM_FILE:close(Handle) of
  	{error,Reason}=Reply ->
  	    {stop,Reason,Reply,State#state{buf= <<>>}};
  	Reply ->
  	    {stop,normal,Reply,State#state{buf= <<>>}}
      end;
  file_request({position,At}, 
  	     #state{handle=Handle,buf=Buf}=State) ->
      case position(Handle, At, Buf) of
  