Added SNAPI debug function