Added 'open' function to open text files