Fixed typo in index.php, Added synchronization support when writing to stars.txt