Add simple error tracking.