Updated stats processor to log error statistics.