using factory method to create daemon instance in tests
path resolution bug fix