Added retries behaviour, logging and metric reporting of bad command execution.