Check the network before starting the task, and fail if there is no network
Check the network before starting the task, and fail if there is no network