Add failedCommand handler