Fix missing logs types statitics when using binary mode. Thanks to Herve Werner for the report.
Fix wrong timestamps saved with top queries. Thanks to Herve Werner for the report.