loadFileAndExtractFeatures small refactoring