Fix bug with eating the last symbol while reading block of data
Add additional assertion in cat