Better use file extensions in readtable and writetable