added write.table to export .txt files