Check write(...) errno for #43