* handle read errors more gracefully Fixes https://github.com/microsoft/vscode/issues/288303 * fix tests