log command on error.