add option to prevent daemonization