Issue #3439535: The parseFile() function should include the necessary checks to handle potential errors
parseFile()
Closes #3439535