import json
import os
import strings

def loadjson(PATH):
    if not os.path.isfile(PATH) or not os.access(PATH, os.R_OK):
        print(strings.errNoFile)
        name = {}
        dumpjson(filename, name)
    with open(PATH) as f:
        name = json.load(f)
    return name

def dumpjson(filename, var):
    with open(filename, "w") as f:
        json.dump(var, f)

def print_owed(owed, chat_id, ower, res, currency):
    for owee in owed[chat_id][ower]:
        amount = owed[chat_id][ower][owee]
        res += "\n" + ower + " owes " + owee + " " + currency + str(amount)

    return res

import json
import os
import strings

def loadjson(PATH):
    if not os.path.isfile(PATH) or not os.access(PATH, os.R_OK):
        print(strings.errNoFile)
        name = {}
        dumpjson(PATH3, name)
    with open(PATH) as f:
        name = json.load(f)
    return name

def dumpjson(filename, var):
    with open(filename, "w") as f:
        json.dump(var, f)

def print_owed(owed, chat_id, ower, res, currency):
    for owee in owed[chat_id][ower]:
        amount = owed[chat_id][ower][owee]
        res += "\n" + ower + " owes " + owee + " " + currency + str(amount)

    return res

fix a name issue in helper.py due to earlier refactor