Add save method

Add a write operation to JSON file