the download works now and it can handle a already downloaded version.
However I have to include a version on the folder name to make it recognize it, so instead of "BePiNex" I have to use something like "BepInEx-v5.4.18" and I think that makes some follow up code fail since the mods don't load (the server as such does), I believe if you download the .zip using your code it extracts it and the folder in there is always BePiNex without a version.
So maybe it's sufficient to do a folder check on Bepinex instead of Bepinex-*?