Catch error when done reading files
Merge pull request #4896

07d5287 Catch error when done reading files (Suhas Daftuar)