Started implementing logging