fix bug for import tool not terminate