1.add close function for LogInternal