import yaml


def load_arguments(yaml_file):
    """
    Reads the yaml file and creates arguments for the rest of the program.
    :param yaml_file: str - path to yaml parameters file
    :return: dict - dictionary with parameters
    """
    read_yaml = None

    try:
        with open(yaml_file, 'r') as stream:
            try:
                read_yaml = yaml.safe_load(stream)
            except yaml.YAMLError as exc:
                print(exc)
    except IOError:
        return None

    return read_yaml