Return proper error message if file I/O fails
Merge pull request #1 from weiss/improve-error-message

Return proper error message if file I/O fails