Added debug messages for the updateSize function