Added beginning stages of dynamic config file plus refactored
one of the methods for dealing with retrieving file extension