create meta and update meta must be combined as I believe. Again, looks complicated. Let's simplify and make logic very explicit, or comment and test thoroughly otherwise.
Also, it is not acceptable to just "continue". We need error or warning in logs about this.