Take into account the return value of read and readinformation
Merge pull request #103 from fvichot/reader-crash

Take into account the return value of read and readinformation