making error tracking a bit correctly