Append result pages to file instead of writing in one go at the end