Added reading from and writing to file