Simplify and fix the patch on incomplete lines in split_logfile. Thanks to brunomgalmeida for the patch.