added a try - except block to make changemaster mode to run even on stopped or started slave