modify daemon function about log