rewrite send command and error