Retry cleanup to avoid errors due to transient file locks on windows