added stricter error handling for invalid and nonexistent settings files.