WRITE_SD - changes and additions

Checked the assignments and wrote the logic for writing to the SD -
card.