fix crash when rename the tailing file