fixed haning log file issue