add Log
replace printf with log