lib: really correctly handle read failure