Updating stream wrapper to use a context option