Optimise file writing by writing a row at a time