def hit(filenames, method, *args, **kwargs):
    """
    Run the given accessor method with args & kwargs; if found remove the
    result path from filenames and return True, else return False.
    """
    try:
        medium = method(*args, **kwargs)
        assert medium.exists
    except ValueError:
        return False
    except:
        print('Error while processing', method, args, kwargs)
        raise
    try:
        filenames.remove(medium.path)
    except KeyError:
        pass
    return True