update the way we check error codes