update build.sh
fix nullreference if token is null, but it should not happen
add unknown message test and log