Extended engine.py to save and load data from file