added security checking for asset fetching