log to one file per thread, to avoid contention