Add IO functionality to load from and save to file