didn't we already have this code in the old ShimWriter or whatever, with some additional smarts such as updating the file if what we would write has changed? I'd expect us to be using that same code...