Add save function to manager.py