Update main.c

Save/Load function