Add error handling to command submission functions

Signed-off-by: Ken Barber <ken@bob.sh>