Add basic test for errors on open
[wip] structured implementation