Added gaurd and logging for table open/close tags