add missing error return handling - identified by Xcode analyze