Improve configuration validation