added verbose logging
reordered log level check