Last 5 commands and error messages working in terminal window