All of the above is too bloated and unneeded. Rather than importing OS.File and TextEncoder just for that, why not just insert the data on-the-fly at the ZIP stream, as pointed above? That way you could have avoided changes on the last 200 lines...