Added debug mode.