Rewrite error detection logic in command processor