put debugging statements inside --debug conditional