Check wifi before making changes