Adding Error check

Signed-off-by: shyeon.kim <shyeon.kim@scipi.net>