I have implemented to flush the log file.