Fix StackLevel too deep when writing to chunkStream