improved the log files management