Added cli script for query monitor, fixed ordering