Add test client and error checking