Improve logging to file for TRACE level.