improved daemon management