logging-enhancement, will be split into logical chunks later