add check for text files