I think I've found a solution I re-installed windows using recovery solution and then I upgraded windows before installing any updates on the current version of windows. after upgrading I started downloading updates and now my windows is up to date with no errors.