fix copying files in cache from remote resources