Improve config file check.