Added saving to stream support