Merge "fix: use write instead of read to generate SError"