Improve error reporting to log file: Eg. "Terminating on error: john.c:144"
Closes #800.