add callback to perform operations after resource loading.