added more detailed debug informaiton for gensgd with inf values in target