Added stacktrace to logging.