Splits files.

Needs to flag last page of written file.
Seems to work.
Reference.