Added logging support
Added cycle functionality