add  a log util & recode stats