Split and merge files