If no query word is given, exit.