Added a small function to dump elements on quit