change config file format js to json. fix some syntax warning.