Changed isConfigValid to stringInFile as it's more generalised