Add line numbering and better error handling to InitConfig()'s do while loop.