def add_to_run_context(settings, key, value):
    """
    Add key and value carefully to the settings
    :param key: the key to be added
    :param value: the value belonging to the key
    :param settings: the loaded settings
    :return:
    """
    if 'run_context' not in settings:
        settings['run_context'] = {}
    settings['run_context'][key] = value
    return settings
