Print link query statistics after finishing the script