Well, to be honest, I'd steer clear of the D models. They had a lot of emissions problems, software was getting rolled out monthly to correct. If you can find a low hour C model that hasn't been abused or a great deal on an E that would be the way to go. Now, the newer Volvos have issues as well. If you need an injector, you're replacing the cup and injector. Major undertaking requiring thousands in tooling and experience. The core machine is as solid as they get, just know they have their shortcomings.
Komatsu, on the other hand, doesn't seem to suffer as the Volvos do regarding emissions, they have lesser issues with hydraulics. Certainly nothing to turn down a good offer. Engines, Komatsu wins, hydraulics, a tie. At least Komatsu valves are modular, you don't have to sacrifice an entire valve for a faulty function. Undercarriage, I gotta give it to Volvo, they seem to last. Good luck in your decision.
Everyone here knows I like the Volvos but I have to admit, the Komatsus are proving their worth every day.