I just had a quick play with your injector to see if you have resolved the issue regarding injecting larger roms than the base VC issue. This is a known issue for those that do a lot of injects, which no one has found a solution.
SNES and NES are the only two consoles that have these issues, all other consoles don't have this issue.
SNES:
Max rom size you can inject is 4mb (32MB Cart Size), this shouldn't be a problem, since your default selection of VC base roms are 4mb (32MB Cart Size), except for Super Mario Kart which is 512k (4MB Cart Size).
Lets say you selected Super Mario Kart as your VC base, and you go and inject a rom that is 1MB (8MB Cart Size), your injector script will bomb out.
NES:
Max rom size you can inject is 512k, the two default VC base rom selections you have are:
Punch-Out!! [EUR]: Rom size 128k.
Duck Hunt [EUR]: Rom size 24k.
NES Zapper Games:
Lets say I want to inject To The Earth, which is another Zapper game, this rom size is 64k, since Duck Hunt is 24k rom size, your injector script will bomb out.
At the moment the only NES Zapper game your going to successfully inject is Hogan's Alley, since this rom is 24k. Wild Gunman rom size is also 24k, but don't need to inject this game since it's officially released on the eShop.
Below are a few NES base VC's which are 512k that you can use to inject the larger NES game roms:
StarTropics
Wario's Woods
Zoda's Revenge Star Tropics II
People are not going to have much issues with NES injects, since most roms are under 512K in size, then you also got to consider the MAPPERS and if its V or H used for the NES games. On the eShop there is a lot of variety of official NES VC's released, you just need to cross reference what the MAPPERS and V/H are and select the base VC that closest match the rom your trying to inject. This will be trial and error to get NES games to work.
Same goes for SNES injects, most will not have any issues, but it's those ROM HACKS/PATCHES/TRANSLATION crowd that might/will have issues since I know there is a few patched roms that are over 4mb in size, these can't be injected.
I don't know what is involved to fix the larger rom inject issue, but every single, so called universal VC inject app/program/scripts, all have the same problem with the above, it would be nice if someone worked out a way.
Then again, just use RetroArch and be done with with.
Also, the one thing that annoys me about your script is that, when it bombs out, there is no error message or logs letting you know what went went wrong???
Is this something you can implement? because this will surely help those doing injects and having issues.