Checked network status and show an alert dialog on network error