Exception logging added.