Added debug mode
Added debug mode