new log mechanism
fixed critical bug with infinity loop, when candle > step