create demo daemon code