def METHOD_NAME(config):
    """Save config file so that we can know the config when we look back
    """
    filelist = config.files2saved
    targetpath = config.log_dir
    if filelist is not None:
        for file_or_dir in filelist:
            if os.path.isdir(file_or_dir):
                last_name = get_last_dir(file_or_dir)
                dst = os.path.join(targetpath, last_name)
                try:
                    copy_and_overwrite(file_or_dir, dst)
                except Exception as e:
                    print(e)
                print("backup %s to %s" % (file_or_dir, targetpath))
            else:
                for filename in files(files=file_or_dir):
                    if os.path.isfile(filename):
                        print("backup %s to %s" % (filename, targetpath))
                        shutil.copy2(filename, targetpath)
                    else:
                        print("%s is not existed." % filename)