added autonaming of output in write.pts