print table only if anything to print