Added a print array when the add button is executed.