function file_contents(filename) local fd = io.open(filename, "r") local data = fd:read("*all") fd:close() return data end