Implemented error tracking.