return actual error code from addTriangle in readBinary