improve daemon manager