Add locking around GetStream()