Throw exception when count of closing brackets don't match opening brackets

Removing static from $level changes the semantic of the variable but I don't think it is really meant to be static. However, this implementation gives the possibility to check whether all brackets which were opened in one file are closed again.