local M = {} function M.file_exists(fname) if fname == nil then return false end local f = io.open(fname, "r") if f ~= nil then io.close(f) return true else return false end end return M