Pass resource to block for callbacks