Modified getting logic a little and added config file