I think you're already doing that? The only thing that's added is serializing the plan to a file and then deserializing it to make the changes.