increase robustness when get deployments failed with file in use