Not an array ref in call to write_row