Added ping check so it can run offline