fix typesConfigFile detection and validation