added counters for errors