Rewritten config module to support passing config file by CLI