Added exception/stacktrace logging