explicit error checking in read done, send empty buffer in that case and do not allow more reading