these error cases should probably call `this.Close()`, right?