in reply to keeping context in a loop
Name "main::uwordi" used only once: possible typo at... [download]
Fix that first, then if you still have problems, try to reduce your code to something we can run -- without reliance on external files or databases.