added error count to generator