Now fully working with timeouts, runs MAX_CYCLE cycles, then stops and log number of failed cycles