Add unmount system before format

I have add it to make the flash working even if system is mount before flash