Added code to read from text files along with databases