refactored loading of root folder to work both from IDE and launching from jar