add arg debug
use logger for logging
v0.5