updated daemon script