Add check root permissions logic
Add write image logic and dialogs
Ask for reboot