your event listener should not be local since the listener events run in the shells context just like the lua interpreter
wrap your local variables/functions in the handler as enclosures
you can define them elsewhere and just copy them into the scope of your handler to use as upvalues
arg = {...}
function eventhandler(event, ...)
params = {...}
--because upvalues for enclosure
methods = {table of your methods}
variables = {table of your variables}
end
--Check tmp under root for a log that depicts any silent errors the program may have encountered during program execution this w