Changing the save function to include additional fields and also specify document root.