fixed write.table