Correct erroneous behaviour of gui_show_stats flag. Clean log module