Fix to location CSV writing