Add a check before printing teardown logs. 'print_teardown_sections' method does not check '--show-capture' option value, and teardown logs are always printed. Resolves: #3816