fixed path handling in daemon