add an error check to GGA+U creation