Adding an exit command handler