Break on error and add comments.
Add finishing on incompletely received data.