Add a console flag and make the persist flag work correctly