Ok good but if that officer has power next time they can reject you while you enter to The Kingdom.So dont try to fight with them too much you even know your rights.
If u didnt marry.Take birth certificate from local amphur also adress certificate.And if u can have copy id of your child take it.If possible take wife id card copy.And go to Savannakhet Embassy in Laos.Your visa will be 3months Non O dependant child.Then come back Thailand enter with it.After that before expiry 1 month if possible u must go to Amphur together with your child and wife.Then take that document from there.Go to Immigration.You can choose 2 options 1: 2 more months extension no need bank statement 400K thai baht 1900 baht pay u get 2months. 2: If there is 2 months before apply 400K in your bank account.U can get 12 months.