Check line not empty before dereference.
Write the dilution rate as a single list, not a list of lists.
Read the updated output format correctly.