added code to write all 'lines of text' image into same folder