Improved error messages and fixed read_all
Merge branch 'endterm'