Checking existing app overwrites new app document definition