exception hook: write tracebacks to logs

Change-Id: I6dd8d2dde5188b12ee10f0893d9ac4c8d1a14aad