improving the script to create an SD image