Added custom Exceptions and restartBrowser method