Adding generator and logging