Electron not attempting to establish connection to Particle cloud

I am using Electron to send sensor data to our servers. It is supposed to wake up every 5 minutes, retrieve sensor data, establish communication with network, send the data and go back to sleep. The system is powered through AC so I am not at all concerned about power optimization (I am providing 5V power to VIN pin in addition to the Li-Po battery). I am using the following code:

#include <HttpClient.h>
#include <JsonParserGeneratorRK.h>
#include "Particle.h"
#include "Serial5/Serial5.h"
SYSTEM_MODE(SEMI_AUTOMATIC);
SYSTEM_THREAD(ENABLED);
#define TOKEN "xxxxxxxx"
#define SERVER "xxxxxxxx"
#define PORT 8080
#define APN "xxxx" 
STARTUP(cellular_credentials_set(APN, "", "", NULL));
String ACCESS_TOKEN = TOKEN;
void avertListeningMode(void);
Thread thread("avertListen", avertListeningMode);
void avertListeningMode(void) {
	while(true) {
    if (Cellular.listening() == true) {
      Serial.println("Listening Mode found. Averting it by rebooting.");
      Cellular.off();
      delay(300);
      System.reset();
    }
    delay(300);
	}
}
HttpClient http;
http_header_t headers[] = {
   { "Content-Type", "application/json" },
  //  { "Accept" , "application/json" },
  { "Accept" , "*/*"},
  { NULL, NULL } // NOTE: Always terminate headers will NULL
};
http_request_t request;
http_response_t response;
FuelGauge fuel;
void setup() // Put setup code here to run once
{
  request.hostname = SERVER;
  request.port = PORT;
}
void loop() // Put code here to loop forever
{
  delay(5000);
  Serial.begin(9600);
  Serial1.begin(9600);
  pinMode(WKP, INPUT_PULLDOWN);
  delay(2000);
  Serial.println("WKP is HIGH. Waking up.");
  if(!Particle.connected()){
    Serial.println("Unconnected! Connecting.");
    Particle.connect();
  }
  if (waitFor(Particle.connected, 150000)
  { 
        Serial.println("Connected.");
	//Retriving sensor data
    //Communication with cellular network
  }
  else{
    Particle.disconnect();
    Cellular.disconnect();
    delay(2000);
    Cellular.off();
    delay(2000);
  }
  if (digitalRead(WKP)==HIGH){
      do{
          Serial.println("WKP is still HIGH.");
          digitalWrite(B0, HIGH);
          delay(100);
          digitalWrite(B0, LOW);
          delay(1000);
        }while(digitalRead(WKP)==HIGH);
  }
  Serial.println("WKP is LOW. Going to sleep.");
  delay(100);
  Serial.end();
  Serial1.end();
  delay(1000);
  System.sleep(WKP, RISING, SLEEP_NETWORK_STANDBY, 300);
}

The system worked as expected for few days. Afterwards, I observed that Electron is waking up as usual, after every 5 minutes, but it is not attempting to connect to the network (LED breathing white from waking up till going to sleep). I got this from the serial output:

WKP is HIGH. Waking up.
Unconnected! Connecting.
WKP is LOW. Going to sleep.

So it seems like for some reason Particle.connect() is irresponsive. What could be the reason behind this? Do I need to put a Cellular.on() before Particle.connect()? AFAIK, it is not needed.