debug qc script