Added debug mode