Changed writing to file to check that it doesn't include dummy points.