fixing log-stats script