Temporary writeStream implemenation