reverting expect changes
Updated to properly handle read errors