ohhh you're having a different problem, then
(tl;dr is that you can't /allowmod a mod on the frame you load it)
the fix is that you need to make a second text file (say startup2.txt), have the /allowmod command in there, and in the first text file do /loadtext startup2.txt