correct exception messages
fix eof handling in testbamindex