Handle the exit command