Youve got a program thats not closing during shutdown, the pc is rebooting because of the error, hence scandisk.
Try CTRL-ALT-DELETE & close all running programs one at a time & reboot after each one until you find the one that is causing you to reboot instead of shutting down properly.