Lava can save your work in one of two ways. If you want to save the project so you can do work on it later, you need to save it in Lava format so that it can be loaded back into Lava using the File\Load option. Select either Save or Save As from the file menu and you can save your work using the same method as any other application.
NB. Lava uses a default filename. Saving without first Saving As will result in your file being called the default name. Also, an extension of .lava is recommended but not enforced.
If you want to save your work in order to compile and use your GUI, you need to use the Save As Code option. This will tell Lava to take the GUI layout and generate code and save it in a file. Use the file dialog to choose a name and once the file has been saved, you can compile it.
At the moment, Lava doesn't support selective code update so if you actually overwrite a file, it will overwrite any changes you make to it. In the future Lava will be able to let the user add their code to a file and only update the bits it needs to. For now, if you want to add code to a Lava generated file and you need to update the file, extend it and put all your code in the extended class. Make all the components protected so you can access them from the extended class and hey presto, you can still overwrite the file but retain your code.