corrected logic for print check.