add exit status check.
add ping check.