Do not save sections which are empty to file
Better error handling with out of range indexes