fix update hang if update tmp dir is not clean