Write one task one line to file