Save and load to a file the current engine state