no need to use readlines() anymore.  `for pid in task_file` creates an `iter()` on task_file and iterates over the lines.