MDL-47914 report_stats: better handling of user and mode