rename wrapWriter to decodeWriter