Better exception logging to file.