updated checkForChromeAppRuntime function