fix to allow for both passing a config to the constructor or passing a filename from the cli