Pengjia noticed the TS was hanging at the first trigger. Still not sure what is the reason. I will try simpler codes and not loading the scaler libraries since that is the only thing which changed lately.