Improved handling of extra long lines and file read errors.
Improved error reporting; now gives specific error messages.