Catch Lua exception when scanning scripts