Check for errors when reading lines from ini files.

Fixes issue 7283.
Merge pull request #392 from RachelBryk/error-check-ini-file

Check for errors when reading lines from ini files.