fix bug of closing writer; merge configure-daemon with installation