anchor.diff:  			<<"Called Station ID;NAS IP Address;NAS Identifier;">>,
   			<<"Session Duration;Input Octets;Output Octets;">>,
   			<<"Class;Session Terminate Cause">>, $\r, $\n],
  -	case file:write_file(IoDevice, Header) of
  +	case file:write(IoDevice, Header) of
   		ok ->
   			ipdr_csv(Log, IoDevice, Cont, T);
   		{error, Reason} ->
  
positive.code: 	IPDR = <<Time, $;, Seq, $;, User, $;, Sess, $;, IP, $;, IP, $;,
  			Calling, $;, Called, $;, NasIP, $;, NasID, $;, Duration, $;,
  			Input, $;, Output, $;, Class, $;, Cause, $\r, $\n>>,
  	case file:write_file(IoDevice, IPDR) of
  		ok ->
  			ipdr_csv(Log, IoDevice, Cont, T);
  		{error, Reason} ->
  
negative.code: 	end;
  ipdr_xml(Log, IoDevice, Cont, [#ipdrDocEnd{}]) ->
  	Trailer = <<>>,
  	case file:write(IoDevice, Trailer) of
  		ok ->
  			ipdr_file3(Log, IoDevice, xml, Cont);
  		{error, Reason} ->
  