cmdline args, rough logging
replace print with logging calls