debug QC script