add setDebugFlag
call terminate subscription in  deleteSubscription