log identifying information plus stacktrace on error