Adding diagnostic print statements to similarity code.