finish daemon mode.