added in some logging