Fixing logging handlers