Split main document into multiple files