I figured this out. In the sketch it was getting stuck on the following line since writeEthernet is a callback and was getting called but is not initialized yet.
gw.begin(RF24_PA_LEVEL_GW, RF24_CHANNEL, RF24_DATARATE, writeEthernet);
I switched the order to initialize the Ethernet shield first and it works like a charm now
Ethernet.begin(mac, myIp);
// give the Ethernet interface a second to initialize
delay(1000);
// Initialize gateway at maximum PA level, channel 70 and callback for write operations
gw.begin(RF24_PA_LEVEL_GW, RF24_CHANNEL, RF24_DATARATE, writeEthernet);