added rich html exceptions, improved logging