Added check for inifile to see if 'main' is in .sections()