Update homework1.c

Fixxed file saving and loading