Refactoring loaders

Throw exception if config file doesn't exist and refactor to BaseFileLoader.