Add function to read text from files