We also need to add a check in the `updateWifi` function.