fix a bug that hookExecuteCmdAfter function is called at a unintended.
script command deprecated,  instead of added the mode of logger.
console.h was improved the code by doing the script command deprecation.