You could have the best of both worlds and only modify the state of your system through a well defined API and then serialize the change in some kind of config file if and only if the change was successful (rollback to the last good state otherwise).