logging installation and tidying up