I replaced all the exit() with return statements in the /examples testfiles so that resources are cleaned up properly when leaving the test.