Added error counting, removed debug text.