Updated for missing config directory to prevent crashing.