Check if all tags closed before compiling