added commandline args, daemon mode