Add some code to try to capture log files when an exception occurs.