Fixed write.csv call.