write exception when ping failed