added support for using config file