added save_connection

stores connection info into file for GUI