add more test routines for error handling