Add missing exception definition
Add stream_key function