The problem with Defrag and Scandisk is they both run off the C drive which is System disk on which the programs and the Operating System reside. This can cause conflicts and contention problems which interfere with the operation of these programs.
You don't give much information regarding the errors or problem symptoms so I offer the following thoughts:
To minimise the possibility of interference from other programs make sure there are no other programs running or, better still, run in Safe mode.
Another possibility is to run Scandisk in native DOS mode. How to do this depends on the OS you are using.
This thread is now locked and can not be replied to.