use logger for debug.