File order switch, headers, splitting functions