triangles not connected on two sides of a line

I am creating a 2D triangular mesh in a square which has two line cuts. I don’t get any error but the triangles on two sides of one of the lines do not connect at the vertices. I don’t know how to fix this. I have attached the journal file.

I tried to mesh the problem curve separately.
And it does look ok after this but I still get problem reading this mesh in my simulator.

The problem is that you have curves that are not merged in the region. You can see this by zooming into surface 17 and 19 then issuing the command:

highlight curve with is_merged

The curves where the mesh is not conforming are not highlighted, indicating that they are not merged. Looking at your journal file, I can see the problem is around line 244, where you did the merge before the imprint. In this case, the imprint created additional curves which are not merged (because the merge already happened). If you switch those two lines so that the imprint is before the merge, the problem should go away.