Better error logging, state filename, and line-number as well as the message.

Also works for the streaming error message.