Add exception stack trace to log file