test with error exit