Added error message if an error occours whilst executing a command