in reply to do not understand [Fatal] message

There is a key piece of information missing from your post. You pasted this in your question:
} else { # TODO ... }
However, we didn't get the if (...) { that began that section of code. I agree with graff, but just wanted to point out that one vital missing piece as well.