Added some error handling tests