Fix local segmented file creation