Added/Fixed debugging statements for debug mode