working with a background daemon and logging