Propper handling of gerror