log exception stack traces to file