Improved ConfigLoader: fixed the hidden files bug, clean up code