updating the sdk to match the new backend and also only write the file if its a successful app open
fixing tests