Added log generation. In progress..