Made the SMT print statements conditional on a log flag.