basic entity saving and loading from files