fixed the logger generate multiple instances of log file bug