Move some diagnostic print statements to make them look better.