add stacktrace in error logging