Adding network stack calls
Added network check code