Added conditional debug statements