added error count to output