added reading a config file as well as having options to set the filename and path