OK, so here is a complete answer, that saves each line in a separate file.

First a couple of remarks: