Avoid defer, use vips/glib way.