Save History only on the last command when executing all history commands