Added online/offline check