use [[ instead [
because restrain ERROR like -> [: -gt: unary operator expected
check whether smart-id is exist ornot
remove