Add missing error check