Use Vec instead of MemWriter