Retain the context from file up to the first error
Add some more tests.