Added the func of saving data to a .csv.

Hit 's' to save file. TODO: 1) save the file name with
yyyy-mm-dd-hh-mm-ss-bug_name; 2) save time (hh-mm-ss) each time the bug
is plugged