Added error handling block for the Browser listener