Swap ordering of message output and abort

Swap the ordering here, otherwise you never get the output of `raise CommandInvalid`

Refs #41