Added check for existence of browser