Added debug control