The head of the UN refugee agency, stunned by the damage in earthquake-ravaged northern Pakistan, warned that urgent work is needed to avert further tragedy as troops race against time to get aid to the most vulnerable before the frigid Himalayan winter sets in.