Add error handling and ignore blank and commented lines in config.txt.