CHANGED:Network reachability check and handler function applied