Log exception support.
Various minor fixes.