Add CPU tests and better error message