move config.Validate after accessing config value