Added feature to save the state of wallcycler