remoteResource.toBuffer must not contain cacheFile