bug fixed for log file