Bugfix: need to return the modified stream
Check if we support the set of EWSB output parameters
add some comments and improve user error message
make function const