Change message output destination on error in get_network_device()