Changed for input of scan and add log on