net: add checking device state before run command