edited write.table command