Cleaning and add logger