Use numpy.savetxt (handles multiple columns) rather than ndarray.tofile