this function is used to check resource, copy to temporary dir and composite resource path, we should use a reasonable name instead of `check_resource()` like `prepare_resource()` or others.