Fixed cartesian.php to handle new output file format.