support scope, check special arugments to substitute and logging fix