setup before daemon