Add a test mode, handle 429 errors, stop corrupting state file