UK says will work to avoid humanitarian disaster in Afghanistan