local file = io.open(ROOTPATH.."/"..path.."/index.html", "r") if file ~= nil then local response = file:read("*a") client:send(response) file:close() else local file = io.open("errors/404.html", "r") local response = file:read("*a") client:send(response) file:close() end