Made logging togglable and added additional log targets