import json


def load_hashes(fn):
    """Load previously stored URL hashes from a file. Assume a clean sheet when load
    cannot be completed.
    """
    try:
        with open(fn, 'r') as f:
            return json.load(f)
    except FileNotFoundError:
        return {}