fixed to check if network interface is up or not