Thanks Jeffrey, that seems to work. Seems to me that to prevent Lint to complain you need a new() statement outside the if. I like the structure "if OK then new() else error" tho, it looks clearer. Your script seems to have just the same functionality anyway.
Thanks Stefan. Yeah, what you say makes sense: it does not seem that the design "if OK then new() else error" is bad. Still, I wanted to ask cause I am a total noob.
