added new io error type, moved frame read into rescue