Update streams.erl

Changed incorrect error handling to the correct way.