Added querry debug printout for lastMatch logging.