Replace ASSERT in lib functions with error message print and return a value indicating error to allow the caller of lib functions to handle the error. Change-Id: If166484238dc0734041adfdbb19a5b374c044e33 Signed-off-by: Yan, Like <like.yan@intel.com>