debug msg and stopped infinite loop