from pathlib import Path


def validate_path(path):
    """Returns valid path object if input path exists.

    :param path: string with path
    :return: Path
    """

    p = Path(path)

    try:
        return p.resolve(strict=True)
    except FileNotFoundError:
        raise IOError(f"Could not read path: {path}") from None