JsonMonitoring additional fixes (forward-port to 73X)

This brings two additional commits added to 72X PR #6203
(suppressing json file output in case of empty lumisection)