proper ordering of daemonization functions