Added writing and reading from file