anchor.diff:  
   update_datelog(Io, _, []) ->
   	Io;
  -update_datelog({Dir, Prefix, Suffix, N, L, M, OldFile}, Log, Term=[[Suffix | _] | _]) when L > M ->
  -	% Current datelog size exceeded maximum.
  -	% Open a new one and try again.
  -	catch file:close(OldFile),
  +update_datelog({Dir, Prefix, _, N, M, undefined}, Log, Term=[[Suffix | _] | _]) ->
  +	% This is the first datelog attempt.
   	Basename = filename:join(Dir, Prefix)++"_"++Suffix++".log",
   	Filename = io_lib:format("~s.~B", [Basename, N+1]),
   	{ok, File} = file:open(Filename, [append]),
  -	L1 = filelib:file_size(Filename),
  -	update_datelog({Dir, Prefix, Suffix, N+1, L1, M, File}, Log, Term);
  -update_datelog({Dir, Prefix, _, 0, _, M, File}, Log, Term=[[Suffix | _] | _]) ->
  -	% This is the first datelog attempt.
  -	update_datelog({Dir, Prefix, Suffix, 0, M+1, M, File}, Log, Term);
  -update_datelog({Dir, Prefix, Suffix, N, L, M, File}, Log, [[Suffix | Term] | Rest]) ->
  -	B = print_log(File, Log, [Suffix | Term]),
  -	update_datelog({Dir, Prefix, Suffix, N, L+B, M, File}, Log, Rest);
  -update_datelog({Dir, Prefix, _, _, _, M, File}, Log, Term=[[Suffix | _] | _]) ->
  +	update_datelog({Dir, Prefix, Suffix, N+1, M, File}, Log, Term);
  +update_datelog({Dir, Prefix, Suffix, N, M, File}, Log, [[Suffix | Term] | Rest]) ->
  +	case catch file:position(File, {cur, 0}) of
  +		{ok, L} when L < M ->
  +			print_log(File, Log, [Suffix | Term]),
  +			update_datelog({Dir, Prefix, Suffix, N, M, File}, Log, Rest);
  +		_ ->
  +			catch file:close(File),
  +			update_datelog({Dir, Prefix, Suffix, N, M, undefined}, Log, [[Suffix | Term] | Rest])
  +	end;
  +update_datelog({Dir, Prefix, _, _, M, File}, Log, Term=[[Suffix | _] | _]) ->
   	% New suffix, start another datelogging.
  -	update_datelog({Dir, Prefix, Suffix, 0, 0, M, File}, Log, Term);
  +	catch file:close(File),
  +	update_datelog({Dir, Prefix, Suffix, 0, M, undefined}, Log, Term);
   update_datelog(Io, Log, [_ | Rest]) ->
   	update_datelog(Io, Log, Rest).
   
   print_log(Io, Log, [Date, Time, Node, Pid, Tag, Term]) ->
  -	String = io_lib:format("~-8.8s ~s ~s ~p ~p ~p ~1000p~n",
  -						   [Log, Date, Time, Node, Pid, Tag, Term]),
  -	catch io:format(Io, "~s", [String]),
  -	iolist_size(String);
  +	io:format(Io, "~-8.8s ~s ~s ~p ~p ~p ~1000p~n", [Log, Date, Time, Node, Pid, Tag, Term]);
   print_log(Io, Log, Term) ->
  -	String = io_lib:format("~-8.8s ~1000p~n", [Log, Term]),
  -	catch io:format(Io, "~s", [String]),
  -	iolist_size(String).
  +	io_lib:format(Io, "~-8.8s ~1000p~n", [Log, Term]).
   
   dump(Dir, Class, Filename) ->
   	Path = filename:join(Dir, io_lib:format("~s", [Class])),
  
positive.code: 			case Io of
  				none ->
  					{ok, Last, Io};
  				Redir = {_, _, _, _, _, _, _} -> % redirect to dayfile
  					NewIo = update_datelog(Redir, Log, Terms),
  					consume_log(Log, Current, NewIo);
  				_ ->
  
negative.code: 			end,
  			Classes = case Io of
  						  String when is_list(String) ->
  							  [{Class, Current, {Dir, String, undefined, 0, L, undefined}} | Rest];
  						  _ ->
  							  [{Class, Current, Io} | Rest]
  					  end,
  