add config file support

This only adds the new feature about config file.