Log file manager for multithreaded program