editted error messages in thread handlers