Added option to create a backup of device
Made code easier to read