Fix syntax/logic problem when tag property doesn't exist yet

Some simple bug fixing:

When the tag property doesn't exist yet in props, the tag variable isn't defined when the else statement is executed. also, if tag is successfully read, nothing is done with it.

I've cleaned the code up to the best of my understanding of what was intended.... However, I wonder if the "open" functionality should be moved to the filesystem backend... it doesn't seem to make sense here.