Use 'scg_cfg' as input parameters
convert data from database to csv file
Add the mechanism of sleeping for a period time and trying again when association fail