def write_file(path, content):
    """
    Writes content to a file (overwrites if exists).
    """
    with open(path, "w", encoding="utf-8") as f:
        f.write(content)


def append_file(path, content):
    """
    Appends content to a file.
    """
    with open(path, "a", encoding="utf-8") as f:
        f.write(content)
