changed $debug swtich to rely on SCRIPT_DEBUG w/o filter