anchor.diff:  
   update(KeyHash, Key, Value, Node = #node{children=Children,keys=Keys}, Tree = #dmerkle{d=D,file=File,block=BlockSize}) ->
     {FoundKey, {ChildHash,ChildPointer}} = find_child(KeyHash, Keys, Children),
  +  % error_logger:info_msg("reading child at ~p~n for ~p~n", [ChildPointer, Node]),
     Child = read(File,ChildPointer,BlockSize),
     case m(Child) of
       M when M >= D -> update(KeyHash, Key, Value, split_child(Node, FoundKey, Child, Tree), Tree);
  
positive.code: 
  
  %% API
  -export([open/1, open/2, equals/2, update/3, delete/2, leaf_size/1, key_diff/2, close/1]).
  
  -ifdef(TEST).
  -include("etest/dmerkle_test.erl").
  
negative.code:   write(File, BlockSize, replace(Parent, ToReplace, Left, Right));
    
  split_child(Parent = #node{keys=Keys,children=Children}, ToReplace, Child = #node{m=M,keys=ChildKeys,children=ChildChildren}, #dmerkle{file=File,block=BlockSize}) ->
    % error_logger:info_msg("splitting node ~p~n", [Parent]),
    % KeyHash = lists:nth(M div 2, Keys),
    {LeftKeys, RightKeys} = lists:split((M div 2)-1, ChildKeys),
    {LeftChildren, RightChildren} = lists:split(M div 2, ChildChildren),
      % error_logger:info_msg("rightkeys ~p rightchildren ~p leftkeys ~p leftchildren ~p~n", [length(RightKeys), length(RightChildren), length(LeftKeys), length(LeftChildren)]),
    Left = write(File, BlockSize, #node{m=length(LeftKeys),keys=LeftKeys,children=LeftChildren}),
    Right = write(File, BlockSize, Child#node{m=length(RightKeys),keys=RightKeys,children=RightChildren}),
    write(File, BlockSize, replace(Parent, ToReplace, Left, Right)).
  