anchor.diff:  
   handle_call({truncate, Pos}, _From, #file{fd=Fd}=File) ->
       {ok, Pos} = file:position(Fd, Pos),
  -    {reply, file:truncate(Fd), File};
  -
  -handle_call({append_bin, Bin}, _From, #file{fd = Fd} = File) ->
  -    {ok, Pos} = file:position(Fd, eof),
  +    case file:truncate(Fd) of
  +    ok ->
  +        {reply, ok, File#file{eof = Pos}};
  +    Error ->
  +        {reply, Error, File}
  +    end;
  +
  +handle_call({append_bin, Bin}, _From, #file{fd = Fd, eof = Pos} = File) ->
       Blocks = make_blocks(Pos rem ?SIZE_BLOCK, Bin),
       case file:write(Fd, Blocks) of
       ok ->
  -        {reply, {ok, Pos}, File};
  +        {reply, {ok, Pos}, File#file{eof = Pos + iolist_size(Blocks)}};
       Error ->
           {reply, Error, File}
       end;
   
  -handle_call({write_header, Bin}, _From, #file{fd = Fd} = File) ->
  -    {ok, Pos} = file:position(Fd, eof),
  +handle_call({write_header, Bin}, _From, #file{fd = Fd, eof = Pos} = File) ->
       BinSize = byte_size(Bin),
       case Pos rem ?SIZE_BLOCK of
       0 ->
  
positive.code:             {ok, Fd} = file:open(Filepath, OpenOptions),
              ok = file:close(Fd_Read),
              maybe_track_open_os_files(Options),
              {ok, #file{fd=Fd}};
          Error ->
              init_status_error(ReturnPid, Ref, Error)
          end
  
negative.code: -define(SIZE_BLOCK, 4096).
  
  -record(file, {
      fd,
      eof = 0
  }).
  
  % public API
  