Check if $script_mode is set to prevent notices