add in -c option for console mode