Use the archive errno instead of error code