Add windows implementation
Fix redownload files bigger than the cachesize