Well in safe mode only the minimal amount of drivers are started so you have less chance of a program writing to your drive and interfearing with defrag or even scandisk.
The way to get to safemode is
press F8 while booting.Then you will get several boot options.Pick safemode.You'll be warned your entering safemode.yes is ok.Once in,scandisk and defrag.