Re-think the confdir logic