how to stop history from dropping failed command?