Initialize hostResources inside the for loop