corrected exception handling for missing ES config
corrected exception handling for missing ES config