added smarter error notification