def METHOD_NAME(self, fileName, root):
    """Call at.precheck, then add fileName to the global files list."""
    #
    # Call the original method.
    global files
    global original_precheck
    val = original_precheck(self, fileName, root)
    #
    # Save a pointer to the root for later.
    if val and root.isDirty():
        files[fileName] = root.copy()
    return val