rainbowduino: fix possible npe
tpm2serial, fix possible npe, update logging