handle read errors