Check if schema exists before load a config.

Related to #3310.

It does not affect the existing code and adds a needed check for the #3310 feature.