Added debug switch.