Update index.php to handle invalid statsReport gracefully.