Call exit() for non-main functions