and after that even if I have commented them from my code I am getting spark flash status data failed, none of the particle published event is showing in the cloud console.
what to do ?
What is the RGB LED on the device doing?
Have you tried Safe Mode?
You can also put your device in DFU Mode an run particle flash --usb tinker -v to flash Tinker again.
I got it back working but I wonder how did it got wifi off at first place ! Does setting SYSTEM_MODE to manual requires wifi to be turned on manually ?