Add new function to detect if script are running on command-line environment, to remove the HTML output