Add logging (#391)