Close browser on AttributeError