Saving state in a local directory