Enumerating vertices with their indices
What you try is:

verts_file.write("%i " % (v + 1))


But v refers to a MeshVertex instance. What you need is the .index property of the vertex:

verts_file.write("%i " % (v.index + 1))


Or count yourself:

for me in meshes:
    for i, v in enumerate(me.vertices):
        print("%i " % i)
        print("%.16e %.16e %.16e\n" % v.co[:])