[mod] Updated thread error checking.