Fixing some logging