Refactor config file to allow it as an input arg