fix another error!

file.indexOf -> config.indexOf