updated daemon to run only once when 'run' is called