def METHOD_NAME(self):
    filenames = [self.data_filename, self.link_filename]
    for fn in filenames:
        if os.path.exists(fn):
            with NWBHDF5IO(fn, mode='r') as io:
                errors = pynwb_validate(io)
                if errors:
                    for err in errors:
                        raise Exception(err)