Changing in the /example/ files all the exit() statements to return or exception+catch in main, so that resources are cleaned up properly when exiting tests.