small tweak to avoid creating a lot of temporary Files for IResources.