improve exception handing when preparing the browser instance