Change SET_ERROR into SET_DEBUG_ERROR in doRead function