def get_file_contents(filename):
    with open(filename, "r") as file_open_for_reading:
        return file_open_for_reading.read()


def execute_query_biz(user, password, host, port, sid, query_file, args_file, storage):
    query = "" if query_file is None else get_file_contents(query_file)
    args = {} if args_file is None else get_file_contents(args_file)
    return storage.execute_query(user, password, host, port, sid, query, args)
