this is to check error codes