Added functionality to upload text documents