Hook for "stats" command