The in between process of divorce and out of court settlement

I am seperated with my husband but not legally. My divorce case is already there in the court alongwith maintenance. My child is with me and initially my husband did not bother about him as he was an infant now that he is little grown up about 9 years my husband has filed for the custody of my son. I am not working anywhere and depends upon my maternal family for financial aid and whatever little maintenance received from my husband. Though that also is not regular and he many a times lied in the courtroom that he gave the maintenance but he actually didn't. My case is already up for long 8 years. I have changed my lawyer recently and I have been advised by my lawyer that I should go for out of court settlement and get the divorce. My lawyers has suggested to withdraw all the cases and get the divorce. My husband has bothered us many a times by creating ruccus in our locality also in the meetings with the child which the court has granted him he asks uncomfortable questions with the child. I am worried that if I go for out of court settlement and get the divorce what will happen to my child? I am also worried that withdrawing the cases should not give him the liberty to file something against me and take away my child. I am in extreme distress and need some quick advice as what should I do. My husband is not a good nature man. Does withdrawing the cases make him free of the liabilities and can he do any harm after this settlement? Please advice.