Being the person to file for divorce often allows you temporary custody. You can also sometimes get the exclusive use and occupancy of the marital residence pending the divorce if you file first.