I tried to scan the disk as you said, but it just kept on restarting because another program was writing to it

try the scan disk in safe mode