I am a bit confused by all the advice on here. In regards to filing first, and throwing him off guard, getting the upper hand, using texts in court, etc. I can't imagine that any of this benefits you.
Filing first ABSOLUTELY benefited me. In Tennessee there are two courts you can file in: circuit court, and chancery court. Circuit court has multiple judges and serves multiple counties. Chancery court has one judge and serves a single county. Had STBXW filed first, she could have filed in chancery court, which in my county is served by a 75 year old judge who believes young children ALWAYS belong with their mother. I would be lucky to see my daughter every other weekend, despite the fact that she has been living with me sunday through friday every week. By filing in circuit court, we had half a dozen judges who the case could have been assigned to in case the divorce was contested, giving us a far better chance of preserving the status quo.
Other states are undoubtedly different, but blanket advice like the above probably hurts more than it helps. Ask an attorney about issues like that, don't rely on the crowdsourced wisdom of the internet.