Escape keypress closes application; now checked in native code in case Lua error occurs in luaL_dofile