Use _exit() instead of exit() where appropriate