IF she files the I-539 before falling out of status, she will have a reciept that puts her in a "period of authorized stay" during the pendency of the properly filed I-539. AFTER it is filed, THEN you file your I-130 and indicate Consular Processing just as you want to do. By the time the I-539 gets denied, she may have already departed OR the denial will advise her to either leave immediately or more often "within 30 days". In either case, she was planning to leave anyway. Even if she is "out of status" after the date of the denial but before her planned departure, Unlawful Presence does not become a "bar to addmission" until one builds up 180 days of it.