Further updates with the append-mode write, as originally suggested by garo