Rework daemon script more