API change concerning error handling. Implement clean close handshake.

Errors are not thrown (error), but present as second return val