Improve deamon behaviour