Added 'writer' argument to write_vertices()