Fixed gcc warnings
Fixed segmentaion fault on get_dhinfo fclose