Update the code for create/update App function.