Added debug mode printing