But, I can't help but notice that I'm getting a lot of permission denied errors for the files; meaning that the file handles aren't being closed when they are supposedly being closed from Lua.
Can you explain this, or fix it, DC?
f = assert(io.open(tostring(USGN)..'.txt','w')) f:write(blar) f:close()
queue_map = {} for path, data in pairs(queue_map) do 	local f = io.open(path, 'w') 	if f then 		queue_map[path] = nil 		f:write(data) 		f:close() 	end end local f = io.open(path, 'w') if not f then queue_map[path] = blargh else f:write(blargh);f:close() end