<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def updatej9DB(dbname = abrevDBname, saveRawHTML = False):
 """Updates the database of Journal Title Abbreviations. Requires an internet connection. The data base is saved relative to the source file not the working directory. # Parameters _dbname_ : `optional [str]` > The name of the database file, default is "j9Abbreviations.db" _saveRawHTML_ : `optional [bool]` > Determines if the original HTML of the pages is stored, default `False`. If `True` they are saved in a directory inside j9Raws begining with todays date. """

    if saveRawHTML:
        rawDir = '{}/j9Raws'.format(os.path.dirname(__file__))
        if not os.path.isdir(rawDir):
            os.mkdir(rawDir)
        _j9SaveCurrent(sDir = rawDir)
    dbLoc = os.path.join(os.path.normpath(os.path.dirname(__file__)), dbname)
    try:
        with dbm.dumb.open(dbLoc, flag = 'c') as db:
            try:
                j9Dict = _getCurrentj9Dict()
            except urllib.error.URLError:
                raise urllib.error.URLError("Unable to access server, check your connection")
            for k, v in j9Dict.items():
                if k in db:
                    for jName in v:
                        if jName not in j9Dict[k]:
                            j9Dict[k] += '|' + jName
                else:
                    db[k] = '|'.join(v)
    except dbm.dumb.error as e:
        raise JournalDataBaseError("Something happened with the database of WOS journal names. To fix this you should delete the 1 to 3 files whose names start with {}. If this doesn't work (sorry), deleteing everything in '{}' and reinstalling metaknowledge should.\nThe error was '{}'".format(dbLoc, os.path.dirname(__file__), e))