refactored configuration sanity check