Moved around debug outputs.