Properly detect the ShortWrite error