Never call exit() -- make sure everything is destroyed cleanly