check logging level first.  fixes #425