adding a global flag to replace all console msgs