browser cache reliability fix

there are cases when browser.quit will throw exceptions, then browser cache will not be cleaned,and all future close_all will fail for same reason