def METHOD_NAME(file, dir, strict=True):
    saved_stdout = sys.stdout
    saved_stderr = sys.stderr
    xymerr = io.StringIO()
    xymout = io.StringIO()            
    sys.stderr = xymerr
    sys.stdout = xymout
    model_list = []
    try:
        model_list = xym.xym(str(file), str(file.parent), str(dir), strict=strict, debug_level=verbosity-2)
        for name in model_list:
            modfile = moddir / name
            mtime = file.stat().st_mtime
            os.utime(str(modfile), (mtime, mtime))
            if '"' in name:
                name = name.replace('"', '')
                modfile.rename(str(moddir/name))
        model_list = [ n.replace('"','') for n in model_list ]
    except Exception as e:
        self.stderr.write("** Error when extracting from %s: %s" % (file, str(e)))
    finally:
        sys.stdout = saved_stdout
        sys.stderr = saved_stderr
    #
    if verbosity > 1:
        outmsg = xymout.getvalue()
        if outmsg.strip():
            self.stdout.write(outmsg)
    if verbosity>2:            
        errmsg = xymerr.getvalue()
        if errmsg.strip():
            self.stderr.write(errmsg)
    return model_list