Married-Separated & Pregnant

I've been able to enjoy my pregnancy although I'm still legally married & was separated before meeting my SO & getting pregnant. When I was ready to fly home & file for divorce I was just finding out we were expecting and didn't want to go through the court process visibly showing. Not sure if my ex even knows & we plan to do a DNA test after birth so it's documented when I file. I've been told the child is presumed the legal husband's by the courts.

Wondering if anyone knew of someone to go through a similar situation & what the outcome was.