import json


def get_local_facts_from_file(filename):
    """ Retrieve local facts from fact file

        Args:
            filename (str): local facts file
        Returns:
            dict: the retrieved facts
    """
    try:
        with open(filename, 'r') as facts_file:
            local_facts = json.load(facts_file)
    except (ValueError, IOError):
        local_facts = {}

    return local_facts