A very basic disk check is performed before defragmentation starts for obvious reasons. Most will NOT continue if file system anomalies are detected. You must run a disk check to correct these. Since you mention scandisk, it sounds like you are running outside of the NT realm. (dos/9x)
If you are running NT, use chkdsk from a command prompt.
Cheers!