from pathlib import Path


def verify_yaml_file(arg_config):
    """
    Checks whether the path to the yaml file points to an existing file and exits if not.
    :param arg_config : The command line argument path to the yaml config file
    :type arg_config : str
    :return : The absolute path to the yaml config file
    :rtype  : str
    """

    if not Path(arg_config).exists():
        print('Yaml config file does not exist')
        exit(1)
    else:
        return arg_config