neatened up command executor as there is no point catching two different types of exception and handling them in the same way