Separate documents into files