update writeStatistics with avro