Fixed possible hang when reload or reopen log files