This feels like the wrong fix.  Instead, the file should be generated as the right file in the first place.