def manage_config(mode, filename='config.json'):
    if (mode == 'read'):
        with open(filename) as f:
            return load(f)
    elif (mode == 'create'):
        with open(filename, 'w') as f:
            dump({'days': 14, 'long term': 90, 'omit errors long term': True, 'twitter': {'api key': '', 'api secret key': '', 'access token': '', 'access token secret': '', 'message': "Today's update on the active player count and total battles per platform for #worldoftanksconsole."}, 'elasticsearch': {'hosts': ['127.0.0.1']}, 'battle index': 'diff_battles-*', 'tank index': 'diff_tanks-*', 'unique': [7, 14, 30], 'account age': [7, 30, 90, 180, 365, 730, 1095, 1460, 1825], 'battle ranges': [{'from': 1, 'to': 5}, {'from': 5, 'to': 10}, {'from': 10, 'to': 20}, {'from': 20, 'to': 30}, {'from': 30, 'to': 40}, {'from': 40, 'to': 50}, {'from': 50}], 'watermark text': '@WOTC_Tracker', 'wg api key': 'DEMO'})
def manage_config(mode, filename='config.json'):
    if (mode == 'read'):
        with open(filename) as f:
            return load(f)
    elif (mode == 'create'):
        with open(filename, 'w') as f:
            dump({'days': 14, 'long term': 90, 'omit errors long term': True, 'twitter': {'api key': , 'api secret key': , 'access token': , 'access token secret': , 'message': "Today's update on the active player count and total battles per platform for #worldoftanksconsole."}, 'elasticsearch': {'hosts': ['127.0.0.1']}, 'battle index': 'diff_battles-*', 'tank index': 'diff_tanks-*', 'unique': [7, 14, 30], 'account age': [7, 30, 90, 180, 365, 730, 1095, 1460, 1825], 'battle ranges': [{'from': 1, 'to': 5}, {'from': 5, 'to': 10}, {'from': 10, 'to': 20}, {'from': 20, 'to': 30}, {'from': 30, 'to': 40}, {'from': 40, 'to': 50}, {'from': 50}], 'watermark text': '@WOTC_Tracker', 'wg api key': 'DEMO'})