corrected exception handling for missing ES config