add daemon support