I haven't had time to look at your code, yet, or what is generally possible with the foundry modules, but just a quick idea from the road: would splitting up the string data after the file has been picked and before allocating them to variables be a solution?
It should not be to problematic to change the code part the turns that massive string into foundry entities to iterate over multiple variables instead of just parsing one, or so I guess.
Find my stuff on
_|_ F i c t i o n a l m a p s . c o m _|_ D r i v e t h r u R P G _|_
|