added check for return value of c++ function call in vcgImport