Moving the console printing of matches to the the main script.