def _write_line(content, add, overwrite=False):
    """Append to content or replace

    append when overwrite is false,
    replace the last element when overwrite is true"""
    if overwrite == True:
        content[-1] = add
    else:
        content.append(add)
    return content
