Minor change:
- giving an error message when the file is invalid