Only set UID etc if already unset or empty.  Add "error" function.