fixed online/offline cluster logic, added print statements