I currently don't know i g_error terminates the function, so maybe the else is not necessary...