New method for file_loader.py and little code improvements to
segmentation.py