moved counter updating in avg_logger