Sd card + cayenne and wifi interruption

The cayenne code is designed in a way that whenever there is a connection lost, it goes into a loop to reconnect again, hence you get the Network Failed issue. You can try solution from here Online/offline code