adding script to format sd card and write a new image to it