adding error count support.