Fixed recording bug.
Adding more features

Added 'dump to file' button and application exit handler to save to file
when exiting the application.