That is a known issue that only happens with the latest image version. I recommend you to re-flash the Edison with the following image version: Intel Edison Software Release 2.1
In fact, this same question was posted yesterday. I recommend you to check the following thread for additional details: Code Disappears After Unplugging the USB Cables
Thank you very much.