slight improvement for cfg_dir initialization