import pathlib


def file_check(string):
    """Check if the user provided list file actaully exists."""
    path = pathlib.Path(string)
    if path.is_file():
        return path
    raise ValueError(f"file {string} not found")