handle any read errors