minorfix
fix bug
Use logger systematically