Modified editor_open() to report errors to the caller