Moved configuring to configure func.
Added flag '-c' to specify the path to the config file.