function fileExists(file) t, msg = io.open(file, "r") if not t then return false end return true end function string.endsWith(String,End) return End=='' or string.sub(String,-string.len(End))==End end function fixFileName(file) return string.gsub(file, "[\\/^*<>|?:\"]", "_") end