Add error check to correct_stream_fcn
Merge pull request #28 from wortiz/stream-func-check

Add error check to correct_stream_fcn