I am trying to perform a headless setup of a raspberry pi zero W, which involves creating some new files in the boot partition of the SD card before putting it into the pi (wpa_supplicant.conf and ssh). I flashed the card, added the files, and verified that they were saved by ejecting the card then putting it back into my pc to check. However, when I insert the card into the raspberry pi and power it up, it does not connect to Wifi, and when I shut it down and put the card back into my computer, I find that the files that I added are gone.
I followed the same steps as multiple guides on the Internet and none of them seemed to mention how to get around this problem. I am using the latest version of Raspbian stretch lite, a Unirex MicroSDHC 8GB Class 10 card, and a Raspberry Pi zero W. I have tried multiple sd cards, pis and host PCs, but i have not been able to try any different models of anything yet.
Does anybody know what could be the cause of this?