Add -d option to daemonize
log instead of print, for use with -d