def update_dict(d, keys, default_val):
    """
    Checks that all provided fieldnames exist as keys in the dict, and if they are missing creates them with the default value

    Parameters
    ----------
    d: dict
        a dictionary to be updated
    keys: list
        a list of keys to check in the dict
    default_val: str
        a default value to initialize the missing keys to

    Returns
    -------
    dict
        a dictionary with the updated keys
    """
    for key in keys:
        if not d.get(key, None):
            d[key] = default_val
    return(d)