added security check - debug check