handle edge cases with config directory