Saving to and reading from file fixed (close #6)