Fix coverity defects: Unchecked return value from library (CHECKED_RETURN)